Update math.glsl
fixing the float
This commit is contained in:
parent
882dea8d6c
commit
a89e3923e7
|
@ -20,8 +20,8 @@ float rand(const vec2 co) { // Unreliable
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2 rand2(const vec2 coord) {
|
vec2 rand2(const vec2 coord) {
|
||||||
const float width = 1100;
|
const float width = 1100.0;
|
||||||
const float height = 500;
|
const float height = 500.0;
|
||||||
float noiseX = ((fract(1.0 - coord.s * (width / 2.0)) * 0.25) + (fract(coord.t * (height / 2.0)) * 0.75)) * 2.0 - 1.0;
|
float noiseX = ((fract(1.0 - coord.s * (width / 2.0)) * 0.25) + (fract(coord.t * (height / 2.0)) * 0.75)) * 2.0 - 1.0;
|
||||||
float noiseY = ((fract(1.0 - coord.s * (width / 2.0)) * 0.75) + (fract(coord.t * (height / 2.0)) * 0.25)) * 2.0 - 1.0;
|
float noiseY = ((fract(1.0 - coord.s * (width / 2.0)) * 0.75) + (fract(coord.t * (height / 2.0)) * 0.25)) * 2.0 - 1.0;
|
||||||
return vec2(noiseX, noiseY);
|
return vec2(noiseX, noiseY);
|
||||||
|
|
Loading…
Reference in a new issue