Skip to content

Deferred shading. Position Conversion #618

Closed Answered by vanruesc
AndreyPrakhov asked this question in Q&A
Discussion options

You must be logged in to vote

I've added support for GData.POSITION in postprocessing@7.0.0-alpha.4. If an Effect specifies GBuffer.DEPTH as input and accesses gData.position, the field will be populated with the view position.

From what I've read, lighting calculations should either be done in view space or world space. If you need the world position, you can #include <pp_world_utils_pars_fragment> and then use getWorldPosition(gData.position, uv).

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by AndreyPrakhov
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants