From f67360bc063cb4aa9ab19f8e6844804cde4d1cca Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Sun, 29 May 2022 16:45:12 +0200 Subject: [PATCH] Fixed lightgrid and envprobe debug drawing #662 --- neo/shaders/builtin/debug/lightgrid.ps.hlsl | 2 +- neo/shaders/builtin/debug/lightgrid.vs.hlsl | 6 +++--- neo/shaders/builtin/debug/octahedron.ps.hlsl | 2 +- neo/shaders/builtin/debug/octahedron.vs.hlsl | 6 +++--- neo/shaders/builtin/debug/shadowDebug.ps.hlsl | 8 ++++++-- neo/shaders/builtin/debug/shadowDebug.vs.hlsl | 6 +++--- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/neo/shaders/builtin/debug/lightgrid.ps.hlsl b/neo/shaders/builtin/debug/lightgrid.ps.hlsl index 28628ebd..9cbab4e1 100644 --- a/neo/shaders/builtin/debug/lightgrid.ps.hlsl +++ b/neo/shaders/builtin/debug/lightgrid.ps.hlsl @@ -35,7 +35,7 @@ Texture2D t_Atlas : register( t0 ); SamplerState samp0 : register( s0 ); // texture 0 is octahedron cube map atlas struct PS_IN { - float4 position : VPOS; + float4 position : SV_Position; float3 texcoord0 : TEXCOORD0_centroid; float3 texcoord1 : TEXCOORD1_centroid; float4 color : COLOR0; diff --git a/neo/shaders/builtin/debug/lightgrid.vs.hlsl b/neo/shaders/builtin/debug/lightgrid.vs.hlsl index c1cec360..c9e3f92e 100644 --- a/neo/shaders/builtin/debug/lightgrid.vs.hlsl +++ b/neo/shaders/builtin/debug/lightgrid.vs.hlsl @@ -51,9 +51,9 @@ struct VS_IN { }; struct VS_OUT { - float4 position : POSITION; - float3 texcoord0 : TEXCOORD0; - float3 texcoord1 : TEXCOORD1; + float4 position : SV_Position; + float3 texcoord0 : TEXCOORD0_centroid; + float3 texcoord1 : TEXCOORD1_centroid; float4 color : COLOR0; }; // *INDENT-ON* diff --git a/neo/shaders/builtin/debug/octahedron.ps.hlsl b/neo/shaders/builtin/debug/octahedron.ps.hlsl index 1bb131c7..e63d6256 100644 --- a/neo/shaders/builtin/debug/octahedron.ps.hlsl +++ b/neo/shaders/builtin/debug/octahedron.ps.hlsl @@ -36,7 +36,7 @@ SamplerState samp0 : register( s0 ); // texture 0 is octahedron cube map struct PS_IN { - float4 position : VPOS; + float4 position : SV_Position; float3 texcoord0 : TEXCOORD0_centroid; float3 texcoord1 : TEXCOORD1_centroid; float4 color : COLOR0; diff --git a/neo/shaders/builtin/debug/octahedron.vs.hlsl b/neo/shaders/builtin/debug/octahedron.vs.hlsl index 65fec3fc..11d8edc4 100644 --- a/neo/shaders/builtin/debug/octahedron.vs.hlsl +++ b/neo/shaders/builtin/debug/octahedron.vs.hlsl @@ -51,9 +51,9 @@ struct VS_IN { }; struct VS_OUT { - float4 position : POSITION; - float3 texcoord0 : TEXCOORD0; - float3 texcoord1 : TEXCOORD1; + float4 position : SV_Position; + float3 texcoord0 : TEXCOORD0_centroid; + float3 texcoord1 : TEXCOORD1_centroid; float4 color : COLOR0; }; // *INDENT-ON* diff --git a/neo/shaders/builtin/debug/shadowDebug.ps.hlsl b/neo/shaders/builtin/debug/shadowDebug.ps.hlsl index 12f97f54..841bbd9a 100644 --- a/neo/shaders/builtin/debug/shadowDebug.ps.hlsl +++ b/neo/shaders/builtin/debug/shadowDebug.ps.hlsl @@ -30,7 +30,11 @@ If you have questions concerning this license or the applicable additional terms // *INDENT-OFF* -SamplerState samp0 : register(s0); +SamplerState samp0 : register(s0 VK_DESCRIPTOR_SET( 0 )); + +struct VS_IN { + float4 position : SV_Position; +}; struct PS_OUT { float4 color : SV_Target0; @@ -40,4 +44,4 @@ struct PS_OUT { void main( out PS_OUT result ) { result.color = rpColor; -} \ No newline at end of file +} diff --git a/neo/shaders/builtin/debug/shadowDebug.vs.hlsl b/neo/shaders/builtin/debug/shadowDebug.vs.hlsl index 3f906b82..bc2d1fa8 100644 --- a/neo/shaders/builtin/debug/shadowDebug.vs.hlsl +++ b/neo/shaders/builtin/debug/shadowDebug.vs.hlsl @@ -31,7 +31,7 @@ If you have questions concerning this license or the applicable additional terms // *INDENT-OFF* #if USE_GPU_SKINNING -cbuffer CB : register( b1 ) +cbuffer CB : register( b1 VK_DESCRIPTOR_SET( 0 )) { float4 matrices[408]; }; @@ -46,7 +46,7 @@ struct VS_IN { }; struct VS_OUT { - float4 position : POSITION; + float4 position : SV_Position; }; // *INDENT-ON* @@ -109,4 +109,4 @@ void main( VS_IN vertex, out VS_OUT result ) result.position.z = dot4( vPos, rpMVPmatrixZ ); result.position.w = dot4( vPos, rpMVPmatrixW ); #endif -} \ No newline at end of file +}