Add normal maps to the floor
This commit is contained in:
@@ -4,11 +4,13 @@ in vec3 vPos;
|
||||
layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec4 fPos;
|
||||
layout (location=2) out vec4 normal;
|
||||
uniform sampler2DArray tilesetSampler;
|
||||
layout (binding=0) uniform sampler2DArray tilesetSampler;
|
||||
layout (binding=1) uniform sampler2D normalSampler;
|
||||
void main()
|
||||
{
|
||||
fCol = texture(tilesetSampler, vTexPos);
|
||||
//fCol = texture(tilesetSampler, vec3(0.3,0.1,0) + vTexPos);
|
||||
fCol = vec4(0.2,0.3,0.6,1);
|
||||
//fCol = vec4(0.6,0.4,0.3,1);
|
||||
fPos = vec4(vPos,1);
|
||||
//normal = vec4(vPos.xy,vPos.z-1,1);
|
||||
normal = vec4(vPos.xy,vPos.z-1,1);
|
||||
normal = vec4(vPos + vec3(0.5) - texture(normalSampler,2*vTexPos.xy).xyz,0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user