12345678910111213141516171819 |
- #version 430
- layout (binding = 0) uniform sampler3D noiseSamp;
- layout (binding = 1) uniform sampler3D textureSamp;
- uniform float height;
- in vec3 varTextureG;
- in vec3 varNormalG;
- out vec4 color;
- const vec3 light = vec3(-0.746, -0.373, -0.224);
- void main(void) {
- vec3 f = texture(textureSamp, (varTextureG + vec3(0.0, height, 0.0)) * 8.0).xyz;
- float l = max(dot(light, varNormalG), 0.0) * 0.7 + 0.3;
- color = vec4(f * l, 1.0);
- }
|