1
0
mirror of synced 2024-12-30 00:13:05 +01:00
ImHex/plugins/visualizers/romfs/shaders/default/lightFragment.glsl

23 lines
405 B
Plaintext
Raw Normal View History

#version 330
in VertexData {
vec3 normal;
vec4 color;
vec3 fragPosition;
} vertexData;
out vec4 outColor;
void main() {
vec3 nLight = normalize(-vertexData.fragPosition);
vec3 nNormal = normalize(vertexData.normal);
float dotLN = dot(nLight, nNormal);
float diffuse = dotLN * 0.5;
vec3 color = (diffuse+0.7)*vertexData.color.xyz;
2024-02-24 23:34:29 +01:00
outColor = vec4(color, 1.0F);
}