Skip to content
Snippets Groups Projects
Commit a8680a64 authored by dg's avatar dg
Browse files

fix shaders to always use floats

git-svn-id: http://svn.net-core.org/repos/t-engine4@866 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9ca1e1d2
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ uniform vec4 color2;
void main(void)
{
float fTime0_X = tick / 1000;
float fTime0_X = tick / 1000.0;
//gl_FragColor = mix(color1, color2, smoothstep(0.3,0.7,mod(fTime0_X/2.0,1.0)));
//gl_FragColor = mix(color1, color2, sin(fTime0_X*2.0));
gl_FragColor = mix(color1, color2, smoothstep(0.3,0.7,abs(mod(fTime0_X,2.0)-1.0)));
......
......@@ -3,7 +3,7 @@ uniform float tick;
void main(void)
{
float fTime0_X = tick / 4000;
float fTime0_X = tick / 4000.0;
vec4 color1 = vec4(1,1,1,1);
vec4 color2 = vec4(1,0.8,1,1);
gl_FragColor = mix(color1, color2, smoothstep(0.3,0.7,abs(mod(fTime0_X,2.0)-1.0)));
......
......@@ -9,7 +9,7 @@ const float PI = 3.14159265;
void main()
{
float fTime0_X = tick / 1000;
float fTime0_X = tick / 1000.0;
float count = fTime0_X/2.0;
vec4 col1;
vec4 col2;
......
......@@ -8,7 +8,7 @@ int blursize = 7;
void main(void)
{
float fTime0_1 = tick / 5000;
float fTime0_1 = tick / 5000.0;
vec2 offset = 1.0/texSize;
// Center Pixel
......
......@@ -7,7 +7,7 @@ uniform vec4 color2;
void main(void)
{
float fTime0_X = tick / 100000;
float fTime0_X = tick / 100000.0;
vec2 coord = mapCoord+gl_TexCoord[0].xy;
float noisy = texture3D(noisevol,vec3(coord,fTime0_X)).r;
float noisy2 = texture3D(noisevol,vec3(coord/5.0,fTime0_X)).r;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment