water_caustics.frag.json 572 B

12345678910111213141516
  1. {
  2. "patches": [
  3. {
  4. "matches": [
  5. "varying vec2 v_TexCoord;",
  6. "vec4 scene= texSample2D(g_Texture0, v_TexCoord);",
  7. "float mask= texSample2D(g_Texture1, v_TexCoord.zw).r;"
  8. ],
  9. "replacements": {
  10. "varying vec2 v_TexCoord;": "varying vec4 v_TexCoord;",
  11. "vec4 scene= texSample2D(g_Texture0, v_TexCoord);": "vec4 scene= texSample2D(g_Texture0, v_TexCoord.xy);",
  12. "vec3 colour= vec3(pow(abs(c), u_WaveColor * u_Brightness));": "vec3 colour= vec3(pow(abs(c), (u_WaveColor * u_Brightness).x));"
  13. }
  14. }
  15. ]
  16. }