No Description

particle.frag 532B

123456789101112131415161718
  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 vec4 inColor;
  7. layout (location = 1) in float inGradientPos;
  8. layout (location = 0) out vec4 outFragColor;
  9. void main ()
  10. {
  11. vec3 color = texture(samplerGradientRamp, vec2(inGradientPos, 0.0)).rgb;
  12. outFragColor.rgb = texture(samplerColorMap, gl_PointCoord).rgb * color;
  13. }