diff options
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/default_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/default_frag.glsl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/default_frag.glsl b/source/blender/draw/engines/eevee/shaders/default_frag.glsl new file mode 100644 index 00000000000..0d3690e5171 --- /dev/null +++ b/source/blender/draw/engines/eevee/shaders/default_frag.glsl @@ -0,0 +1,15 @@ + +uniform vec3 basecol; +uniform float metallic; +uniform float specular; +uniform float roughness; + +out vec4 FragColor; + +void main() +{ + vec3 dielectric = vec3(0.034) * specular * 2.0; + vec3 diffuse = mix(basecol, vec3(0.0), metallic); + vec3 f0 = mix(dielectric, basecol, metallic); + FragColor = vec4(eevee_surface_lit((gl_FrontFacing) ? worldNormal : -worldNormal, diffuse, f0, roughness, 1.0), 1.0); +} |