Updated displacement example
This commit is contained in:
parent
0ecff76c40
commit
2ec1a60535
16 changed files with 77 additions and 177 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
|
||||
layout (binding = 3) uniform sampler2D colorMap;
|
||||
layout (binding = 2) uniform sampler2D colorMap;
|
||||
|
||||
layout (location = 0) in vec3 inNormal;
|
||||
layout (location = 1) in vec2 inUV;
|
||||
|
|
@ -25,5 +25,5 @@ void main()
|
|||
vec4 IAmbient = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
vec4 IDiffuse = vec4(1.0) * max(dot(inNormal, inLightVec), 0.0);
|
||||
|
||||
outFragColor = vec4((IAmbient + IDiffuse) * texture(colorMap, inUV));
|
||||
outFragColor = vec4((IAmbient + IDiffuse) * vec4(texture(colorMap, inUV).rgb, 1.0));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue