Jump to content

Multiple shaders


Ebbe
 Share

Recommended Posts

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..

Link to comment
Share on other sites

  • 1 month later...

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)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...