godotengine / godotengine/godot
writing to `POSITION` gives wrong `VIEW` in fragment shader
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
stable 4.3
### System information
Kubuntu 22.04
### Issue description
If you write to `POSITION` to make a full screen post processor, then your `VIEW` vector will become invalid and you have to calculate it manually.
What i observe that if i write to `POSITION` then the `VIEW` variable will become affected by camera translation.
### Steps to reproduce
write to POSITION
### Minimal reproduction project (MRP)
[viewbugreport.zip](https://github.com/user-attachments/files/17450091/viewbugreport.zip)
Contributor guide
Research direction
Start by opening the attached viewbugreport.zip in Godot 4.3 and reproducing the fragment-shader case that writes to POSITION. Compare VIEW with and without that write while checking the rendering and shader paths involved; done means VIEW remains valid and unaffected by camera translation.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100