Rastar Posted February 18, 2015 Posted February 18, 2015 Is there any way to pass additional uniforms to the lighting shaders (directionallight.shader, ...) ? (Provided I have modified the sources and added those uniforms). Which is equivalent to. Is there a way to get a reference to the loaded shaders? I guess when I call Shader::Load() for those shaders I get a separate instance that I then set uniforms on, not the one actually loaded by the render code? Quote
Josh Posted February 18, 2015 Posted February 18, 2015 The light shaders are stored in a member of the OpenGL4Camera class: class OpenGL4Camera : public OpenGL2Camera { public: Shader* shader_ambient[7]; Shader* shader_directional[8][2][3]; Shader* shader_point[8][2][3]; Shader* shader_spot[8][2][3]; The different variations are loaded as needed, and there are 48 possible combinations. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Rastar Posted February 18, 2015 Author Posted February 18, 2015 Ummmm, sorry for a silly question, but I can't see the forest for the trees right now... what are those combinations (8*2*3) again? And those 7 for the ambient? Quote
Josh Posted February 19, 2015 Posted February 19, 2015 [multisamplemode][shadowmode][lightquality] Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Rastar Posted February 20, 2015 Author Posted February 20, 2015 Ahh, OK. And those 7 ambients? By the way, it seems the camera (range, zoom) uniforms aren't passed to the ambient lighting shaders. While that is fine for "ordinary", view-independent ambient terms, I would like to calculate an ambient specular contribution. Would it be possible to at least hand those two to the ambient lighting shaders so I can calculate the view direction vector? Thanks again! Quote
AggrorJorn Posted February 20, 2015 Posted February 20, 2015 Nice information. Added to the Articles section of the wiki. http://leadwerks.wikidot.com/wiki:articles Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.