Jump to content

How to use the underwater shader?


havenphillip
 Share

Recommended Posts

On 2/26/2020 at 4:22 AM, Marcousik said:

Right thx adebgamesoft and Russel

 Actually it would be nice to use this shader on a specific material as it seems to turn the entire scene to marble: It is so impossible to compose a scene with old creepy material and marble

I know the screen space reflection shader looks for a specular texture. In around line 76:

        //Get specmap from gbuffer
        float specularity = texelFetch(texture3, ivec2(icoord*buffersize),0).a;
        
        //only compute if we hvae specularity
        if (specularity > 0.0f)
        {

 

I haven't tried this but it could be that you could change the texture to 6 or something and just add your specular on "texture6" in slot 6 in the ones you want to have the reflective effect. Seems like it should avoid everything that doesn't have a specular there.

Link to comment
Share on other sites

On 2/26/2020 at 1:51 PM, Russell said:

You can make a scene with all creepy materials and only some marble materials in there. But you need work the Textures. Not the shader.

yes all right thx ?

Happy it can be done. So only set the specular to 0 on material and the effect of the shader is gone, cool thing really.

 

 

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.

 Share

×
×
  • Create New...