Ebbe Posted November 26, 2020 Share Posted November 26, 2020 Hi, I'm experimenting with shaders, and find it quite fun. But I'm running into a problem. I don't want the same shader for everything. Currently I'm initialising the video with a custom compositor. This works fine, but is using the same shader for everything. Is there a way to use one compositor/shader for some of the 'Renderable's but not others? Or is the solution to somehow tell the shader which 'mode' it's in? I'm testing to have my 2d map lit up by different lights, but that should not have an effect on the HUD.. Quote Link to comment Share on other sites More sharing options...
obiot Posted January 11, 2021 Share Posted January 11, 2021 Hi, in the latest 8.x branch we did revamp partially the WebGL implementation, and introduced a new GLShader class which aims to be the base in providing such a multiple shader feature, with the possibility to specify a Shader manually .Unfortunately for now beside switching between the 2 shaders used internally for primitive drawing and sprite it has not been really tested, and probably the current code needs further changes to allow it (now we have one compositor used for both primitive drawing and sprite rendering that automatically switch shader , it should be split into two compositor, allowing for each to use a user defined shader) Quote Link to comment Share on other sites More sharing options...
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.