Skip to content

Commit

Permalink
fixes #746 - added uv-starts-at-top check - based on unity docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pfcDorn committed Jul 11, 2024
1 parent 66f72b1 commit 6d8ff3e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Runtime/Shaders/ShaderGraph/PBRHelpers.cginc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ float3 Sample4Tap(float2 uv, float lod)

void SampleSceneColor_float(float2 uv, float lod, out float3 color)
{
#if !UNITY_UV_STARTS_AT_TOP
if (_CameraOpaqueTexture_TexelSize.y > 0)
uv.y = 1-uv.y;
#endif

#define REQUIRE_OPAQUE_TEXTURE // seems we need to define this ourselves? HDSceneColorNode does that as well

#if defined(USE_CAMERA_OPAQUE)
Expand Down

0 comments on commit 6d8ff3e

Please sign in to comment.