Questions tagged [godot-shader-language]
34 questions
0
votes
1 answer
How to write values to depth buffer in godot fragment shader?
How do you specify the depth value in the fragment shader, if you would like to for example render a texture of a sphere that also affect depht buffer in the cameras z-direction?
In OpenGL you can use gl_FragDepth. Is there a similar builtin…

Lasersköld
- 2,028
- 14
- 20
0
votes
1 answer
How to crop sprite in a non-rectangular form?
I'm trying to cut sprites in non-rectangular forms, I found this for angled cutting but is there a way to crop if an equation is given?
for example the equation of an oval (x−h)^2/a^2 + (y−k)^2/b^2=1 would crop as such:

cak3_lover
- 1,440
- 5
- 26
0
votes
1 answer
How to apply shaders and generate images only once?
I'm trying to apply a pixelation shader to my textures and I need it to be applied only once, after that I can reuse my shader generated images as textures over and over without having to calculate every single time.
so how do I take a few images ->…

cak3_lover
- 1,440
- 5
- 26
0
votes
1 answer
how to view pixelation through camera2D?
I'm trying to create a pixelation shader which I can view through the camera2D node
something like this but instead of black and white I need pixelation
using this answer I got a pixelation shader but how do I view it through the camera?
shader_type…

cak3_lover
- 1,440
- 5
- 26