mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 18:14:06 +09:00
improved shader compatibility with intel builtin gpu
apparently you can't use 1f for float, always use 1.0
This commit is contained in:
@@ -21,7 +21,7 @@ uniform float gcount = 64.0; // using 64: has less banding and most monitors are
|
|||||||
uniform float bcount = 64.0;
|
uniform float bcount = 64.0;
|
||||||
|
|
||||||
// inverted zoom; this value must set to (1f/zoom)
|
// inverted zoom; this value must set to (1f/zoom)
|
||||||
uniform float zoomInv = 1f;
|
uniform float zoomInv = 1.0;
|
||||||
|
|
||||||
/*int bayer[7 * 7] = int[](
|
/*int bayer[7 * 7] = int[](
|
||||||
32,42,10,27,37,5,15,
|
32,42,10,27,37,5,15,
|
||||||
@@ -74,7 +74,7 @@ void main(void) {
|
|||||||
|
|
||||||
float scale = v_texCoords.y * (1.0 - parallax_size) + (parallax_size / 2.0) + (parallax * parallax_size / 2.0);
|
float scale = v_texCoords.y * (1.0 - parallax_size) + (parallax_size / 2.0) + (parallax * parallax_size / 2.0);
|
||||||
|
|
||||||
float zoomSamplePoint = (1f - zoomInv) / 2f; // will never quite exceed 0.5
|
float zoomSamplePoint = (1.0 - zoomInv) / 2.0; // will never quite exceed 0.5
|
||||||
|
|
||||||
// I don't even know if it works, and also not sure if I actually want it
|
// I don't even know if it works, and also not sure if I actually want it
|
||||||
vec3 newBottom = mix(bottomColor, topColor, zoomSamplePoint);
|
vec3 newBottom = mix(bottomColor, topColor, zoomSamplePoint);
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ uniform vec4 colourFilter = vec4(1, 1, 1, 1); // used by WALL to darken it
|
|||||||
|
|
||||||
uniform ivec2 cameraTranslation = ivec2(0, 0); // used to offset the drawing
|
uniform ivec2 cameraTranslation = ivec2(0, 0); // used to offset the drawing
|
||||||
|
|
||||||
uniform float drawBreakage = 1f; // set it to 0f to not draw breakage, 1f to draw it; NEVER set to any other values.
|
uniform float drawBreakage = 1.0; // set it to 0f to not draw breakage, 1f to draw it; NEVER set to any other values.
|
||||||
|
|
||||||
uniform float zoom = 1f;
|
uniform float zoom = 1.0;
|
||||||
|
|
||||||
|
|
||||||
ivec2 getTileXY(int tileNumber) {
|
ivec2 getTileXY(int tileNumber) {
|
||||||
|
|||||||
Reference in New Issue
Block a user