Expose explicit camera transform to volume programs
This commit is contained in:
parent
d7ba6aa651
commit
e6ba1a36f6
3 changed files with 5 additions and 1 deletions
|
|
@ -79,3 +79,6 @@ requirements without assigning gameplay or product meaning to the layer keys.
|
||||||
`source=port,scale,offset`. This lets animated native programs consume
|
`source=port,scale,offset`. This lets animated native programs consume
|
||||||
provider-authoritative simulation time without making the client clock an
|
provider-authoritative simulation time without making the client clock an
|
||||||
authority.
|
authority.
|
||||||
|
Native volume programs may advertise a `cameraToWorld` matrix port when their
|
||||||
|
procedural passes require an explicit camera transform instead of relying on
|
||||||
|
render-pipeline globals.
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,7 @@ namespace GameCult.Eve.UnityScene.Fields
|
||||||
var gpuProjection = GL.GetGPUProjectionMatrix(camera.projectionMatrix, true);
|
var gpuProjection = GL.GetGPUProjectionMatrix(camera.projectionMatrix, true);
|
||||||
var viewProjection = gpuProjection * camera.worldToCameraMatrix;
|
var viewProjection = gpuProjection * camera.worldToCameraMatrix;
|
||||||
SetMatrixPort("cameraInverseViewProjection", viewProjection.inverse);
|
SetMatrixPort("cameraInverseViewProjection", viewProjection.inverse);
|
||||||
|
SetMatrixPort("cameraToWorld", camera.cameraToWorldMatrix);
|
||||||
SetVectorPort("cameraProjectionExtents", ProjectionExtents(camera));
|
SetVectorPort("cameraProjectionExtents", ProjectionExtents(camera));
|
||||||
SetFloatPort("raymarchOffset", Halton(Time.frameCount & 1023, 3));
|
SetFloatPort("raymarchOffset", Halton(Time.frameCount & 1023, 3));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "org.gamecult.eve.unity-scene",
|
"name": "org.gamecult.eve.unity-scene",
|
||||||
"displayName": "Eve Unity Scene Lowering",
|
"displayName": "Eve Unity Scene Lowering",
|
||||||
"version": "0.3.48",
|
"version": "0.3.49",
|
||||||
"unity": "6000.0",
|
"unity": "6000.0",
|
||||||
"description": "Provider-agnostic Unity scene shell for gamecult.eve.surface.v1 interactive world surfaces.",
|
"description": "Provider-agnostic Unity scene shell for gamecult.eve.surface.v1 interactive world surfaces.",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
Reference in a new issue