Skip to content

Glass material / View distortion to fake refraction #179

Answered by Kolupsy
Kolupsy asked this question in Q&A
Discussion options

You must be logged in to vote

Fake Refraction now possible:

Link: 9fbf6e4

Shader function:

vec4 sample_opaque(vec2 uv)
{
    #ifdef PIXEL_SHADER
    {
        if(Settings.Transparency)
        {
            return texture(IN_OPAQUE_COLOR, uv);
        }
    }
    #endif
    return vec4(0);
}

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Kolupsy
Comment options

Kolupsy Nov 26, 2021
Collaborator Author

Comment options

Kolupsy
Dec 24, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by Kolupsy
Comment options

Kolupsy
Sep 10, 2022
Collaborator Author

You must be logged in to vote
1 reply
@pragma37
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants