Skip to content

Commit

Permalink
Simplify fragment shader, just set diffuse color
Browse files Browse the repository at this point in the history
  • Loading branch information
hmans committed Jun 9, 2022
1 parent e1de8da commit a05fa3a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/vfx/src/shader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,12 @@ void main() {
/* Get diffuse color */
vec4 diffuse4 = vec4(diffuse, 1.0);
/* Mix diffuse color with the animation color */
csm_DiffuseColor = mix(diffuse4 * v_colorStart, diffuse4 * v_colorEnd, v_progress);
/* Apply the diffuse color */
csm_FragColor = csm_DiffuseColor;
csm_DiffuseColor = mix(diffuse4 * v_colorStart, diffuse4 * v_colorEnd, v_progress);
/* Mix in the texture */
#ifdef USE_MAP
csm_FragColor *= texture2D(map, vUv);
csm_DiffuseColor *= texture2D(map, vUv);
#endif
}
`

0 comments on commit a05fa3a

Please sign in to comment.