Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Miasmata: Fix light shafts (new technique)
This is the vertex shader for the final stage of the light shafts in this game, where they are transferred from a radial coordinate system into screen coordinates. The vertex shader has an input which I believe is the world coordinates of the vertex being operated on, which need to be corrected. Problem is - we have no way to get the correct amount to adjust it by in world coordinates. As such, we take the world-view-projection matrix of an object that is never rotated, in this case we just use the water matrix since we already have it. We run two points back through this shader and subtract the resulting points, which removes the objects translation leaving the correction amount in world space.
- Loading branch information
1 parent
de625c3
commit 8c8f51d
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters