Texture tree and terrain scene, refactoring and cleanup

This commit is contained in:
saschawillems 2017-12-21 21:28:31 +01:00
parent 34942b08c5
commit 75b2a72957
13 changed files with 200 additions and 97 deletions

View file

@ -3,15 +3,12 @@
layout (binding = 1) uniform sampler2DArray shadowMap;
layout (location = 0) in vec2 inUV;
layout (location = 1) flat in uint inCascadeIndex;
layout (location = 0) out vec4 outFragColor;
layout(push_constant) uniform PushConsts {
uint cascadeIndex;
} pushConsts;
void main()
{
float depth = texture(shadowMap, vec3(inUV, float(pushConsts.cascadeIndex))).r;
float depth = texture(shadowMap, vec3(inUV, float(inCascadeIndex))).r;
outFragColor = vec4(vec3((depth)), 1.0);
}