diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-03-27 08:16:18 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-03-27 08:16:18 +0300 |
commit | b95ee78ed3f1851443aea871ffd1b1fd36e5ab1b (patch) | |
tree | 9a22b58d2323040d89c49a1ac49318cb0aca2fd3 /source/blender/gpu/shaders/gpu_shader_fire_frag.glsl | |
parent | 159f56f4abf30ed1f4b81645a325d051e880cb16 (diff) |
OpenGL: prepare GLSL for version 3.3
- use in/out instead of attribute/varying
- use named output instead of gl_FragColor
- use texture() instead of the multitude of older texture sampling functions
The #if __VERSION__ == 120 paths (needed on Mac) will be removed after we switch to 3.3 core profile.
Part of T49165 (general OpenGL upgrade)
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_fire_frag.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_fire_frag.glsl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl b/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl index 3819203bcd9..45f86e036a1 100644 --- a/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl @@ -1,5 +1,13 @@ -varying vec3 coords; +#if __VERSION__ == 120 + varying vec3 coords; + #define fragColor gl_FragColor +#else + in vec3 coords; + out vec4 fragColor; + #define texture1D texture + #define texture3D texture +#endif uniform sampler3D flame_texture; uniform sampler1D spectrum_texture; @@ -13,5 +21,5 @@ void main() color.rgb = emission.a * emission.rgb; color.a = emission.a; - gl_FragColor = color; + fragColor = color; } |