Use the hlsli extension for shader includes

This commit is contained in:
Sam Lantinga
2024-03-05 12:46:44 -08:00
parent 4898505f23
commit 1e0bac288b
10 changed files with 10 additions and 8 deletions
@@ -1,5 +1,5 @@
#include "D3D11_PixelShader_Common.incl" #include "D3D11_PixelShader_Common.hlsli"
float4 main(PixelShaderInput input) : SV_TARGET float4 main(PixelShaderInput input) : SV_TARGET
{ {
@@ -1,5 +1,5 @@
#include "D3D11_PixelShader_Common.incl" #include "D3D11_PixelShader_Common.hlsli"
float4 main(PixelShaderInput input) : SV_TARGET float4 main(PixelShaderInput input) : SV_TARGET
{ {
@@ -1,7 +1,7 @@
Texture2D theTexture : register(t0); Texture2D theTexture : register(t0);
SamplerState theSampler : register(s0); SamplerState theSampler : register(s0);
#include "D3D11_PixelShader_Common.incl" #include "D3D11_PixelShader_Common.hlsli"
float4 main(PixelShaderInput input) : SV_TARGET float4 main(PixelShaderInput input) : SV_TARGET
{ {
+1 -1
View File
@@ -75,7 +75,7 @@ typedef struct
Float4X4 projectionAndView; Float4X4 projectionAndView;
} VertexShaderConstants; } VertexShaderConstants;
/* These should mirror the definitions in D3D11_PixelShader_Common.incl */ /* These should mirror the definitions in D3D11_PixelShader_Common.hlsli */
//static const float TONEMAP_NONE = 0; //static const float TONEMAP_NONE = 0;
//static const float TONEMAP_LINEAR = 1; //static const float TONEMAP_LINEAR = 1;
static const float TONEMAP_CHROME = 2; static const float TONEMAP_CHROME = 2;
+1 -1
View File
@@ -171,7 +171,7 @@ typedef struct
Float4X4 projectionAndView; Float4X4 projectionAndView;
} VertexShaderConstants; } VertexShaderConstants;
/* These should mirror the definitions in VULKAN_PixelShader_Common.incl */ /* These should mirror the definitions in VULKAN_PixelShader_Common.hlsli */
//static const float TONEMAP_NONE = 0; //static const float TONEMAP_NONE = 0;
//static const float TONEMAP_LINEAR = 1; //static const float TONEMAP_LINEAR = 1;
static const float TONEMAP_CHROME = 2; static const float TONEMAP_CHROME = 2;
@@ -1,4 +1,5 @@
#include "VULKAN_PixelShader_Common.incl"
#include "VULKAN_PixelShader_Common.hlsli"
float4 main(PixelShaderInput input) : SV_TARGET float4 main(PixelShaderInput input) : SV_TARGET
{ {
@@ -1,5 +1,5 @@
#include "VULKAN_PixelShader_Common.incl" #include "VULKAN_PixelShader_Common.hlsli"
float4 main(PixelShaderInput input) : SV_TARGET0 float4 main(PixelShaderInput input) : SV_TARGET0
{ {
@@ -1,4 +1,5 @@
#include "VULKAN_PixelShader_Common.incl"
#include "VULKAN_PixelShader_Common.hlsli"
float4 main(PixelShaderInput input) : SV_TARGET float4 main(PixelShaderInput input) : SV_TARGET
{ {