diff options
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_fire_frag.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_fire_frag.glsl | 14 |
1 files changed, 6 insertions, 8 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..fc9cafb6b02 100644 --- a/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl @@ -1,17 +1,15 @@ -varying vec3 coords; +in vec3 coords; +out vec4 fragColor; uniform sampler3D flame_texture; uniform sampler1D spectrum_texture; void main() { - float flame = texture3D(flame_texture, coords).r; - vec4 emission = texture1D(spectrum_texture, flame); + float flame = texture(flame_texture, coords).r; + vec4 emission = texture(spectrum_texture, flame); - vec4 color; - color.rgb = emission.a * emission.rgb; - color.a = emission.a; - - gl_FragColor = color; + fragColor.rgb = emission.a * emission.rgb; + fragColor.a = emission.a; } |