godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.94k stars 3.21k forks source link

Update Advanced postprocessing page #9387

Closed lschlieder closed 3 months ago

lschlieder commented 5 months ago

4.2.2

I have run into an issue with the documentation regarding advanced post processing shaders.

In all Godot 4.0 versions the mesh that is supposed to be our view quad is affected by shadows from the scene. I don't know if this is somehow specific to Linux/Vulkan, so i would like to confirm, that this indeed what happens for other people as well, since other tutorials seem not to reproduce this effect. (see: https://www.youtube.com/watch?v=gqe0InyIk4U&t=949s), even though they are on Godot 4. I assume the shadows somehow are calculated before moving the vertices of the quad in the vertex shader, so we get shadows from our scene objects on the quad, that is moved right in-front of the camera. A simple fix is to add

  void light() {
  DIFFUSE_LIGHT = vec3(1.0);
  } 

to the spatial shader of the quad. I would like to add this to the doc page, and maybe someone should look into this behavior, since it seems to be inconsistent on different systems as far as i can tell.

URL to the documentation page (if already existing):

lschlieder commented 5 months ago

A better solution is to set the render mode to: render_mode unshaded;