Jump to content

[SOLVED] How to set texture point sampling


photo

Recommended Posts

Posted

Is it possible to override texture sampling mode e.g. for diffuse texture for an inherited base material ? We tried

 

<material name="mesh_heatmap_base" parent="mesh_base" editable="0">

 <!-- bindings -->
 <bind object="mesh_dynamic" to="mesh"/>

 <!-- textures -->
 <texture name="diffuse" anisotropy="1" filter="point">rde/textures/heatmap-ramp.png</texture>
</material>

 

for setting diffuse texture sampling mode to point sampling, but this just causes log message

 

Loading "rde_base.mat" 3 materials 656 shaders 6ms</div>
Xml::printUnusedData(): unused argument "anisotropy=1" in "texture" node in "rde_base.mat" file</div>
Xml::printUnusedData(): unused argument "filter=point" in "texture" node in "rde_base.mat" file</div>

Posted

Same question for overriding texture wrap mode ?

Posted

It's impossible to override texture flags in the inherited materials right now.

As a temporary workaround you can declare an additional texture with specified flags and bind this texture on correct unit.

 

<material name="mesh_heatmap_base" parent="mesh_base" editable="0">

 <!-- bindings -->
 <bind object="mesh_dynamic" to="mesh"/>

 <!-- textures -->
 <texture name="diffuse_point" anisotropy="1" filter="point" unit="8">rde/textures/heatmap-ramp.png</texture>
</material>

Posted

thanks frustum, already did this, but was wondering if there is a way to reuse existing texture slot.

Posted

Retransmitting Frustum words: sorry, for now the option mentioned above is the only one. (He'd be glad to add this feature, but the clone of him is pretty much required. Where are biologists when you need them?)

  • 3 months later...
Posted

Maybe we could put this on the wish-list too ;) Don't think its a big thing to implement for frustrum's clone, but would give some elegant low-level texturing control to the users needing it without having to 'waste' already limited texture slots.

  • 2 weeks later...
Posted

BTW while reading the old post: will this also include texture wrapping mode or just the sampling mode ?

Posted

All format, filtering, wrapping and anisotropy control can be overridden.

×
×
  • Create New...