Tweaking Shader Values in realtime

Posted By: oldschoolj

Tweaking Shader Values in realtime - 10/14/07 16:37

Is it relatively easy to tweak shader values in realtime. And if so whats the best method to do this, and what are the limitations. I would like to be able to tweak ambient, specular, diffuse, phong, tiling, etc. with a custom inteface i've built. What sort of variables do i need to make for this and how do I tie them all into the code?
Posted By: Excessus

Re: Tweaking Shader Values in realtime - 10/14/07 17:26

Use material or entity skills. You can set mtlSkills in c-script with the float() function, and in lite-c by assiging a float value (like 1.0f). You can access these values in the shader with mtlSkill1...mtlSkill4 or the entSkill variables.
Posted By: ello

Re: Tweaking Shader Values in realtime - 10/14/07 17:56

plus you have direct access to the materials ambient, specular and so on values thru vecAmbient ... in the shader
© 2023 lite-C Forums