ulf.schroeter Posted May 4, 2012 Posted May 4, 2012 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>
ulf.schroeter Posted May 4, 2012 Author Posted May 4, 2012 Same question for overriding texture wrap mode ?
frustum Posted May 5, 2012 Posted May 5, 2012 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>
ulf.schroeter Posted May 5, 2012 Author Posted May 5, 2012 thanks frustum, already did this, but was wondering if there is a way to reuse existing texture slot.
manguste Posted May 8, 2012 Posted May 8, 2012 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?)
ulf.schroeter Posted August 22, 2012 Author Posted August 22, 2012 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.
ulf.schroeter Posted September 1, 2012 Author Posted September 1, 2012 BTW while reading the old post: will this also include texture wrapping mode or just the sampling mode ?
frustum Posted September 1, 2012 Posted September 1, 2012 All format, filtering, wrapping and anisotropy control can be overridden.
Recommended Posts