diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-10-07 13:06:38 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-10-07 13:06:53 +0400 |
commit | 14c57b6c783302a86175412d6f4abf70408f19d3 (patch) | |
tree | a2203768b3407448001b094723d1164a716c95ec /source/blender/gpu/shaders | |
parent | 5e809c45edf253e828813b417770889f83a95bb6 (diff) |
Fix T42074, textured lamps influncing other layers
The solution is to do the multiplication with the energy in the shader
after texture application.
We might be able to avoid setting dyncol completely, but this needs
better investigation. Some shader paths also look a bit redundant.
Also, texture mapping is not supported very well for light lamps, might
also need investigation.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 3ba36c11311..1caa154fc13 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -385,6 +385,11 @@ void set_value(float val, out float outval) outval = val; } +void set_value_v3(vec3 val, out vec3 outval) +{ + outval = val; +} + void set_rgb(vec3 col, out vec3 outcol) { outcol = col; @@ -1960,6 +1965,11 @@ void shade_mul_value(float fac, vec4 col, out vec4 outcol) outcol = col*fac; } +void shade_mul_value_v3(float fac, vec3 col, out vec3 outcol) +{ + outcol = col*fac; +} + void shade_obcolor(vec4 col, vec4 obcol, out vec4 outcol) { outcol = vec4(col.rgb*obcol.rgb, col.a); |