updated RayMarching Demo (#997)

* Removed Unused Uniforms

uniform vec3 viewUp;
uniform float deltaTime;

* Removed Unused uniforms

uniform vec3 viewUp;
uniform float deltaTime;

* Updated Source

  Added   - #define PLATFORM_DESKTOP line for desktop users.
            This now will correctly find the proper glsl version for the raymarching.fs file.
  Removed - Uniforms --> deltaTime and viewUp. Including the code that was setting them.
            They were never used and they were triggering a log warning.
  Removed - The const from both screenWidth and screenHeight.
            Now they can be used to update the shader resolution when screen is resized.
            NOTE : This is a quick fix and probably not the best idea.
  Added   - IsWindowResized() to check if screen is resized.
            If window is resized then width, height and shader resolution are updated.
  Changed - MIT tag at bottom right color value to BLACK. Now it's easier to see.

* Closer Match to original code

* Removed the PLATFORM_DESKTOP Define
This commit is contained in:
Industrious Nomad 2019-10-26 03:45:15 -04:00 committed by Ray
parent 39e22046c1
commit a6db31c01e
3 changed files with 18 additions and 16 deletions

View file

@ -8,8 +8,6 @@ varying vec4 fragColor;
uniform vec3 viewEye;
uniform vec3 viewCenter;
uniform vec3 viewUp;
uniform float deltaTime;
uniform float runTime;
uniform vec2 resolution;
@ -428,4 +426,4 @@ void main()
#endif
gl_FragColor = vec4( tot, 1.0 );
}
}

View file

@ -9,8 +9,6 @@ out vec4 finalColor;
uniform vec3 viewEye;
uniform vec3 viewCenter;
uniform vec3 viewUp;
uniform float deltaTime;
uniform float runTime;
uniform vec2 resolution;
@ -429,4 +427,4 @@ void main()
#endif
finalColor = vec4( tot, 1.0 );
}
}