What does ResolvedView.WorldCameraOrigin actually do?
I just came across this function when checking Ryan Bucks guide for creating volumetric fog. It appears to be used in a custom material node to somehow get the camera position but I am not entirely sure if this is correct.
So do you have any suggestions or actual answers to what ResolvedView.WorldCameraOrigin does?
Also do you know if/where can I find some documentation about the parameters or built in variables that I can access from inside custom material nodes?
asked Nov 22 '17 at 09:20 PM in Rendering
That line of code is a uniform shader parameter associated with a view. Here's the index. link text
It does indeed get the the world camera position. You can call these in code with View. or ResolvedView.
Example, return ResolvedView.AtmosphericFogSunDirection;
This get the Directional light (needs the AtmosphericFogSun flag on the light set).
Heres the index for uniform shader parameters associated with a primitive link text.
Take a look inside the LocalObjectBounds node in the material editor, note it uses LocalObjectBoundsMin and LocalObjectBoundsMax called in code with Primitive.
Hope that helps.
answered May 27 '18 at 01:50 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here