forked from itycodes/MineClone
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
455 B
20 lines
455 B
#version 450
|
|
|
|
layout(location = 0) out vec4 outColor;
|
|
|
|
layout(location = 0) in vec4 normal;
|
|
layout(location = 1) in vec4 pos_pre;
|
|
|
|
layout(push_constant, std430) uniform pc {
|
|
layout(offset=32) vec4 data;
|
|
};
|
|
|
|
void main() {
|
|
outColor = vec4(data.rgb*(1.0+dot(normal.xyz, normalize(vec3(-0.7, -0.5, -0.1))))/2.0, 1.0);
|
|
//if(pos_post.z <= 0.0) {
|
|
// outColor = vec4(1.0);
|
|
//}
|
|
//outColor = normal.xyz;
|
|
//outColor = vec4(vec3(1.0-gl_FragCoord.z), 1.0);
|
|
}
|