Open yikescloud opened 1 year ago
Some hardware does not supporting reading from DEPTH_TEXTURE as mentioned in the docs. Some hardware supports reading from DEPTH_TEXTURE, but does not support both reading from SCREEN_TEXTURE and DEPTH_TEXTURE. In that case, an error should have been printed to the console.
Can you please let me know whether any error is printed to the console when running your MRP on your device?
On my device I can't detect any issues at all
Some hardware does not supporting reading from DEPTH_TEXTURE as mentioned in the docs. Some hardware supports reading from DEPTH_TEXTURE, but does not support both reading from SCREEN_TEXTURE and DEPTH_TEXTURE. In that case, an error should have been printed to the console.
Can you please let me know whether any error is printed to the console when running your MRP on your device?
On my device I can't detect any issues at all
Godot not give me any error message, from right now the only way to solve this is send viewport texture to shader as a SCREEN_TEXTURE manually. If this issue is related to the hardware, I think we can add more info to the doc to point this.
I encountered the same problem. There are no errors in the console, but if in the shader there is a call to both DEPTH_TEXTURE and SCREEN_TEXTURE, then SCREEN_TEXTURE equal to vec3(1.0, 1.0, 1.0)
I wonder if this is actually a GPU driver/hardware issue?
Tested on systems: 1) AMD Ryzen 3 5300U with Radeon Graphics (Vega 6) Win 10 2) RTX3080ti Laptop, Win 11 3) Mediatek Helio P65 MT6768 (Android) White SCREEN_TEXTURE on ALL devices in GLES2, but in GLES3 everything is ok.
This problem doesn’t allow to implement decals with lighting (decal which use depth buffer + screen_texture): almost free “deferred” rendering of a very large number of light sources, and this would have been possible even on GLES2! if not for this bug, or if it had been possible was to take the depth buffer as viewport_texture (as uniform in shader)...
Godot version
3.5 stable
System information
windows 10
Issue description
When gles2 shader has a DEPTH_TEXTURE code(what ever it runs or not), the SCREEN_TEXTURE not work. Like code below:
Steps to reproduce
Write a DEPTH_TEXTURE in shader and read SCREEN_TEXTURE in gles2.
Minimal reproduction project
GLES2DepthTexture.zip