You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS/device including version:
Macbook Pro, macOS 10.13.6 Beta (17G62a)
Issue description:
I have a simple shader that mixes the alpha channel from 4 additional sampler2D parameters, and uses that as the alpha for the final colour which comes from the primary TEXTURE. On GLES3 this works fine and masks off the primary texture as expected, on GLES2 the alpha seems to come back as 0 all the time. Oddly, if I change the mask generation line to:
I get an image, but it looks like it's getting the alpha from the primary TEXTURE sampler, not the specified additional ones, as it shows the animated water as the alpha.
Steps to reproduce:
Load the attached project.
You can see the sprite is completely invisible, the blue-ish square is the collision shape.
Change the renderer in Project-->Project Settings-->Rendering:Quality to GLES3, save and close.
Re-open with the same project and you'll see that in GLES3 the result is as expected, with parts of the water masked off.
Switch back to GLES2, save & close, and reload.
Change the shader as described in the description, to see that it appears to be getting the alpha from the primary channel, and moreover, seems to dislike the 'a' member of the colour.
For reference, I see the following errors printed to the shell when making any changes, successful or otherwise, to the shader:
type is: canvas_item
ERROR: complete: Failed to parse shader
At: servers/visual/shader_language.cpp:4128.
ERROR: _code_complete_script: Shaderlang complete failed
At: editor/plugins/shader_editor_plugin.cpp:196.
Using specific commits on my fork is a bit of a problem, since I rebase regularly and the latest changes are all applied on top. Can you try the latest version of the fork?
Sorry, my mistake, I thought I'd checked out the branch, turns out I was building master. Rebuilding the gles2 branch now, will report status momentarily.
Godot version:
Custom Build @ c45a8a5 on the GLES2 fork https://github.com/karroffel/godot/tree/gles2. Also shown to be an issue on the official master @ 02372bf
OS/device including version:
Macbook Pro, macOS 10.13.6 Beta (17G62a)
Issue description:
I have a simple shader that mixes the alpha channel from 4 additional sampler2D parameters, and uses that as the alpha for the final colour which comes from the primary TEXTURE. On GLES3 this works fine and masks off the primary texture as expected, on GLES2 the alpha seems to come back as 0 all the time. Oddly, if I change the mask generation line to:
float alpha = (texture(mask_texture_ul, UV).r + texture(mask_texture_ur, UV).r + texture(mask_texture_ll, UV).r + texture(mask_texture_lr, UV).r);
and the colour calculation to:
COLOR = vec4(1, 0, 0, alpha);
I get an image, but it looks like it's getting the alpha from the primary TEXTURE sampler, not the specified additional ones, as it shows the animated water as the alpha.
Steps to reproduce:
For reference, I see the following errors printed to the shell when making any changes, successful or otherwise, to the shader:
Minimal reproduction project:
gles2_shader_issue.zip
The text was updated successfully, but these errors were encountered: