- add layout location decl to all postprocess shaders

This commit is contained in:
Magnus Norddahl 2019-03-05 18:55:31 +01:00
parent 87441dd0a1
commit b313f91ab0
22 changed files with 26 additions and 26 deletions

View file

@ -284,7 +284,7 @@ FString FShaderProgram::PatchShader(ShaderType type, const FString &code, const
patchedCode << "precision highp float;\n"; patchedCode << "precision highp float;\n";
patchedCode << "#line 1\n"; patchedCode << "#line 1\n";
patchedCode << code; patchedCode << RemoveLayoutLocationDecl(code, type == Vertex ? "out" : "in");
if (maxGlslVersion < 420) if (maxGlslVersion < 420)
{ {

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D Bloom; layout(binding=0) uniform sampler2D Bloom;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D SceneTexture; layout(binding=0) uniform sampler2D SceneTexture;
layout(binding=1) uniform sampler2D ExposureTexture; layout(binding=1) uniform sampler2D ExposureTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D SourceTexture; layout(binding=0) uniform sampler2D SourceTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D SceneTexture; layout(binding=0) uniform sampler2D SceneTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D AODepthTexture; layout(binding=0) uniform sampler2D AODepthTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D ExposureTexture; layout(binding=0) uniform sampler2D ExposureTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D ExposureTexture; layout(binding=0) uniform sampler2D ExposureTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D SceneTexture; layout(binding=0) uniform sampler2D SceneTexture;

View file

@ -32,7 +32,7 @@
// //
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D InputTexture; layout(binding=0) uniform sampler2D InputTexture;

View file

@ -29,7 +29,7 @@
kcube = vec3(0.15, 0.0, 0.0); kcube = vec3(0.15, 0.0, 0.0);
*/ */
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D InputTexture; layout(binding=0) uniform sampler2D InputTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
#if defined(MULTISAMPLE) #if defined(MULTISAMPLE)

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D InputTexture; layout(binding=0) uniform sampler2D InputTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D LeftEyeTexture; layout(binding=0) uniform sampler2D LeftEyeTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D LeftEyeTexture; layout(binding=0) uniform sampler2D LeftEyeTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D LeftEyeTexture; layout(binding=0) uniform sampler2D LeftEyeTexture;

View file

@ -1,7 +1,7 @@
layout (location = 0) in vec4 PositionInProjection; layout(location = 0) in vec4 PositionInProjection;
layout (location = 1) in vec2 UV; layout(location = 1) in vec2 UV;
out vec2 TexCoord; layout(location = 0) out vec2 TexCoord;
void main() void main()
{ {

View file

@ -1,7 +1,7 @@
layout (location = 0) in vec4 PositionInProjection; layout(location = 0) in vec4 PositionInProjection;
layout (location = 1) in vec2 UV; layout(location = 1) in vec2 UV;
out vec2 TexCoord; layout(location = 0) out vec2 TexCoord;
void main() void main()
{ {

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
// A node in an AABB binary tree with lines stored in the leaf nodes // A node in an AABB binary tree with lines stored in the leaf nodes

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D DepthTexture; layout(binding=0) uniform sampler2D DepthTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D AODepthTexture; layout(binding=0) uniform sampler2D AODepthTexture;

View file

@ -1,5 +1,5 @@
in vec2 TexCoord; layout(location=0) in vec2 TexCoord;
layout(location=0) out vec4 FragColor; layout(location=0) out vec4 FragColor;
layout(binding=0) uniform sampler2D InputTexture; layout(binding=0) uniform sampler2D InputTexture;