Keine Beschreibung

particle.frag 493B

1234567891011121314151617
  1. #version 450
  2. #extension GL_ARB_separate_shader_objects : enable
  3. #extension GL_ARB_shading_language_420pack : enable
  4. layout (binding = 0) uniform sampler2D samplerColorMap;
  5. layout (binding = 1) uniform sampler2D samplerGradientRamp;
  6. layout (location = 0) in float inGradientPos;
  7. layout (location = 0) out vec4 outFragColor;
  8. void main ()
  9. {
  10. vec3 color = texture(samplerGradientRamp, vec2(inGradientPos, 0.0)).rgb;
  11. outFragColor.rgb = texture(samplerColorMap, gl_PointCoord).rgb * color;
  12. }