fireball/lib/renderers/shaders/ShaderChunk/map_particle_fragment.glsl
2018-12-25 17:29:22 +03:30

8 lines
193 B
GLSL

#ifdef USE_MAP
vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
vec4 mapTexel = texture2D( map, uv );
diffuseColor *= mapTexelToLinear( mapTexel );
#endif