diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-08-25 09:53:20 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-08-25 09:56:10 -0300 |
commit | 90445aae67159adafbcbb5a0027d1e793d6ea7ef (patch) | |
tree | e4ce7d686b34500c35d83cc3c35d0f5705e2447c /drivers/gles3/shaders/scene.glsl | |
parent | 490aef93699abc00da58f73b1596fb3473fd53c6 (diff) |
Fixed opaque unshaded materials, they go through the regular opaque render list, closes #9917
Diffstat (limited to 'drivers/gles3/shaders/scene.glsl')
-rw-r--r-- | drivers/gles3/shaders/scene.glsl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index e6476bd6b6..c9e9dacdb5 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -1969,6 +1969,14 @@ FRAGMENT_SHADER_CODE #ifdef USE_MULTIPLE_RENDER_TARGETS + +#ifdef SHADELESS + frag_color=vec4(albedo,alpha); + diffuse_buffer=vec4(albedo.rgb,0.0); + specular_buffer=vec4(0.0); + +#else + #if defined(ENABLE_AO) float ambient_scale=0.0; // AO is supplied by material @@ -1984,6 +1992,7 @@ FRAGMENT_SHADER_CODE diffuse_buffer=vec4(emission+diffuse_light+ambient_light,ambient_scale); specular_buffer=vec4(specular_light,metallic); +#endif //SHADELESS normal_mr_buffer=vec4(normalize(normal)*0.5+0.5,roughness); @@ -1991,6 +2000,7 @@ FRAGMENT_SHADER_CODE sss_buffer = sss_strength; #endif + #else //USE_MULTIPLE_RENDER_TARGETS |