summaryrefslogtreecommitdiffhomepage
path: root/examples/shaders/shaders_eratosthenes.data
diff options
context:
space:
mode:
authorRay <[email protected]>2022-08-02 10:31:31 +0200
committerRay <[email protected]>2022-08-02 10:31:31 +0200
commit5fc1538c24f61bd5973ce6f3514ecaadef8f1cd9 (patch)
treebd81bb12ac15d4d9697baaa6d448cdd15c4a85cf /examples/shaders/shaders_eratosthenes.data
parent192e2026607b27e0226a1e2c4336799b77a2b4e8 (diff)
downloadraylib.com-5fc1538c24f61bd5973ce6f3514ecaadef8f1cd9.tar.gz
raylib.com-5fc1538c24f61bd5973ce6f3514ecaadef8f1cd9.zip
Update examples to raylib 4.2
Diffstat (limited to 'examples/shaders/shaders_eratosthenes.data')
-rw-r--r--examples/shaders/shaders_eratosthenes.data8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/shaders/shaders_eratosthenes.data b/examples/shaders/shaders_eratosthenes.data
index ba6de89..0d5fcc5 100644
--- a/examples/shaders/shaders_eratosthenes.data
+++ b/examples/shaders/shaders_eratosthenes.data
@@ -11,7 +11,7 @@ precision mediump float;
Each integer is tested to see if it is a prime number. Primes are colored white.
Non-primes are colored with a color that indicates the smallest factor which evenly divdes our integer.
- You can change the scale variable to make a larger or smaller grid.
+ You can change the scale variable to make a larger or smaller grid.
Total number of integers displayed = scale squared, so scale = 100 tests the first 10,000 integers.
WARNING: If you make scale too large, your GPU may bog down!
@@ -27,11 +27,11 @@ vec4 Colorizer(float counter, float maxSize)
{
float red = 0.0, green = 0.0, blue = 0.0;
float normsize = counter/maxSize;
-
+
red = smoothstep(0.3, 0.7, normsize);
green = sin(3.14159*normsize);
blue = 1.0 - smoothstep(0.0, 0.4, normsize);
-
+
return vec4(0.8*red, 0.8*green, 0.8*blue, 1.0);
}
@@ -41,7 +41,7 @@ void main()
float scale = 1000.0; // Makes 100x100 square grid. Change this variable to make a smaller or larger grid.
float value = scale*floor(fragTexCoord.y*scale) + floor(fragTexCoord.x*scale); // Group pixels into boxes representing integer values
int valuei = int(value);
-
+
//if ((valuei == 0) || (valuei == 1) || (valuei == 2)) gl_FragColor = vec4(1.0);
//else
{