Bind some fixed texture arrays only once
This commit is contained in:
@@ -5,8 +5,8 @@ layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec4 fPos;
|
||||
layout (location=2) out vec4 normal;
|
||||
//layout (binding=0) uniform sampler2DArray tilesetSampler;
|
||||
layout (binding=1) uniform sampler2DArray normalSampler;
|
||||
layout (binding=2) uniform sampler2DArray diffuseSampler;
|
||||
layout (binding=40) uniform sampler2DArray diffuseSampler;
|
||||
layout (binding=41) uniform sampler2DArray normalSampler;
|
||||
vec2 rotateV2 (float a, vec2 v)
|
||||
{
|
||||
return vec2(v.x*cos(a) - v.y*sin(a), v.x*sin(a) + v.y*cos(a));
|
||||
|
||||
@@ -5,7 +5,7 @@ const vec2 winSize = vec2 (300.0,300.0);
|
||||
// note that the above opening bracket should be the first in this file
|
||||
// this is so that the window size can be extracted and the shader recompiled on
|
||||
// the fly
|
||||
uniform sampler2D screenTexture;
|
||||
layout (binding = 0) uniform sampler2D screenTexture;
|
||||
const float hOff = 3 / winSize.x;
|
||||
const float vOff = 3 / winSize.y;
|
||||
//const vec2 off[9] = vec2[]
|
||||
|
||||
@@ -8,8 +8,8 @@ in vec4 gPos;
|
||||
in vec4 gNorm;
|
||||
in vec4 gColor;
|
||||
in float gAng;
|
||||
layout (binding=1) uniform sampler2DArray normalSampler;
|
||||
layout (binding=2) uniform sampler2DArray diffuseSampler;
|
||||
layout (binding=40) uniform sampler2DArray diffuseSampler;
|
||||
layout (binding=41) uniform sampler2DArray normalSampler;
|
||||
vec2 rotateV2 (float a, vec2 v)
|
||||
{
|
||||
return vec2(v.x*cos(a) - v.y*sin(a), v.x*sin(a) + v.y*cos(a));
|
||||
|
||||
@@ -8,8 +8,8 @@ in vec4 gPos;
|
||||
in vec4 gNorm;
|
||||
in vec4 gColor;
|
||||
in float gRot;
|
||||
layout (binding=1) uniform sampler2DArray normalSampler;
|
||||
layout (binding=2) uniform sampler2DArray diffuseSampler;
|
||||
layout (binding=40) uniform sampler2DArray diffuseSampler;
|
||||
layout (binding=41) uniform sampler2DArray normalSampler;
|
||||
vec2 rotateV2 (float a, vec2 v)
|
||||
{
|
||||
return vec2(v.x*cos(a) - v.y*sin(a), v.x*sin(a) + v.y*cos(a));
|
||||
|
||||
Reference in New Issue
Block a user