Shaders and textures...

bennyx

28-03-2006 18:07:25

When I export a RenderMonkey shader to use in oFusion I lose control over the texture elements...

Can't oFusion load *.material files?

Or is there another reason?

Lioric

29-03-2006 17:00:07

Can you explain what you mean with "control over the texture elements"?

You dont need to create a ".material" from Render Monkey shaders projects, you just need to save the vertex and pixel shader programs, and put them in the "ogre_azathoth/media/shaders/" folder in your max installation (with the respective ".program" definition)

Then the shader can be used as any other shader in Ogre Materials

The textureSamples (if that is what you are refering) are determined by how they are binded to registers or the order of declaration

But you just see the order of how they are displayed in the shader parameter editor, and then you know the order of textureUnits needed

bennyx

30-03-2006 00:31:01

The material editor (max) doesn't allow me to setup the artistic variables* that relate to textures...

*RenderMonkey

If my pixel shader samples variable.bmp, how do I configure that in 3ds/oFusion?

Lioric

30-03-2006 00:46:19

The textures are not assigned in the shader property (read-only) because in Ogre the samplers that your shader uses are references to TextureUnits in the current pass

If your shader needs a texture, just add a TextureUnit for the pass in the same index your shader references it, i.e. you shader needs a sampler2D and a samplerCUBE, then add a TextureUnit with the 2d image and a TextureUnit with a Cube image


See the normal mapping tutorial for more details

bennyx

31-03-2006 12:42:16

Thank you very much Lioric,

I dived in ithout testing the water I think, but i'm getting it now! :oops:

:)