Skip to content

Commit

Permalink
Addressed pull request comments smooth_cheese.fsh
Browse files Browse the repository at this point in the history
  • Loading branch information
bmabsout committed Feb 8, 2024
1 parent f409eb3 commit 78ac85a
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions app/src/main/assets/Shaders/smooth_cheese.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#version 300 es

/*
* Title: Smooth Cheese
Expand All @@ -15,8 +15,6 @@
* with a following link: https://www.shadertoy.com/view/XsX3zB )
*/

#version 300 es

precision highp float;

uniform float iTime;
Expand Down Expand Up @@ -87,16 +85,15 @@ float simplex3d(vec3 p) {
return dot(d, vec4(52.0));
}

void mainImage( out vec4 fragColor, in vec2 fragCoord )
void main()
{
vec2 p = fragCoord.xy/iResolution.x;
vec2 p = textureCoord;
vec3 p3 = vec3(p, iTime*0.015)+vec3(iTime*0.015,0.0,0.0);

float value = pow(abs(simplex3d(p3*2.0)),1.5);
float red = 0.5 + 0.5*simplex3d(p3*2.0 + 38274.9);
float green = abs(0.2+0.5*simplex3d(p3*2.0 + 3824.9));
float blue = abs(simplex3d(p3*2.0 + 98274.9));
float red = 0.5 + 0.5*simplex3d(p3*2.0 + 38274.9);
float green = abs(0.2+0.5*simplex3d(p3*2.0 + 3824.9));
float blue = abs(simplex3d(p3*2.0 + 98274.9));

fragColor = vec4(sqrt(value*vec3(red, green, blue)), 1.0);
return;
}

0 comments on commit 78ac85a

Please sign in to comment.