diff --git a/features/Grass Lighting/Shaders/RunGrass.hlsl b/features/Grass Lighting/Shaders/RunGrass.hlsl index 4aa36e5f6..d7f4f41eb 100644 --- a/features/Grass Lighting/Shaders/RunGrass.hlsl +++ b/features/Grass Lighting/Shaders/RunGrass.hlsl @@ -1,14 +1,7 @@ #include "Common/Color.hlsl" #include "Common/FrameBuffer.hlsl" #include "Common/MotionBlur.hlsl" - -struct LightingData -{ - float WaterHeight[25]; - bool Reflections; -}; - -StructuredBuffer lightingData : register(t126); +#include "Common/LightingData.hlsl" #define GRASS diff --git a/features/Tree LOD Lighting/Shaders/DistantTree.hlsl b/features/Tree LOD Lighting/Shaders/DistantTree.hlsl index cebc3fea7..991cb3b2e 100644 --- a/features/Tree LOD Lighting/Shaders/DistantTree.hlsl +++ b/features/Tree LOD Lighting/Shaders/DistantTree.hlsl @@ -1,14 +1,7 @@ #include "Common/Color.hlsl" #include "Common/FrameBuffer.hlsl" #include "Common/MotionBlur.hlsl" - -struct LightingData -{ - float WaterHeight[25]; - bool Reflections; -}; - -StructuredBuffer lightingData : register(t126); +#include "Common/LightingData.hlsl" cbuffer PerFrame : register(b3) { diff --git a/package/Shaders/Common/LightingData.hlsl b/package/Shaders/Common/LightingData.hlsl new file mode 100644 index 000000000..387b58199 --- /dev/null +++ b/package/Shaders/Common/LightingData.hlsl @@ -0,0 +1,7 @@ +struct LightingData +{ + float WaterHeight[25]; + bool Reflections; +}; + +StructuredBuffer lightingData : register(t126); \ No newline at end of file diff --git a/package/Shaders/Lighting.hlsl b/package/Shaders/Lighting.hlsl index 9db60eaf5..89e0908c0 100644 --- a/package/Shaders/Lighting.hlsl +++ b/package/Shaders/Lighting.hlsl @@ -2,17 +2,10 @@ #include "Common/FrameBuffer.hlsl" #include "Common/MotionBlur.hlsl" #include "Common/Permutation.hlsl" +#include "Common/LightingData.hlsl" #define PI 3.1415927 -struct LightingData -{ - float WaterHeight[25]; - bool Reflections; -}; - -StructuredBuffer lightingData : register(t126); - #if (defined(TREE_ANIM) || defined(LANDSCAPE)) && !defined(VC) # define VC #endif // TREE_ANIM || LANDSCAPE || !VC