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