forked from LeenkxTeam/Leenkx_Examples
update
This commit is contained in:
17
material_shaders/Shaders/MyCustomMaterial.frag.glsl
Normal file
17
material_shaders/Shaders/MyCustomMaterial.frag.glsl
Normal file
@ -0,0 +1,17 @@
|
||||
#version 450
|
||||
|
||||
in vec3 mpos;
|
||||
in vec3 normal;
|
||||
|
||||
// Color of each fragment on the screen
|
||||
out vec4 fragColor;
|
||||
|
||||
void main() {
|
||||
// Shadeless red color
|
||||
//fragColor = vec4(1.0,0.0,0.0,0.0);
|
||||
|
||||
// Assuming forward rendering path for simplicity
|
||||
vec3 col = (mpos + vec3(1.0)) / 8.0;
|
||||
col += normal * 0.1;
|
||||
fragColor = vec4(col, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user