From b1abe2afda2b940cef2ff26f2f1a0629ff51f7ce Mon Sep 17 00:00:00 2001 From: Jamie Pate Date: Wed, 29 Jun 2022 11:07:15 -0700 Subject: [PATCH] Change numeric constants to be compatible with Godot 3.5 and strictly compatible with GLSL! https://github.com/godotengine/godot/issues/59316 --- addons/MagicaVoxelImporter/points.shader | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/MagicaVoxelImporter/points.shader b/addons/MagicaVoxelImporter/points.shader index 581b2f1..e3f0d0e 100644 --- a/addons/MagicaVoxelImporter/points.shader +++ b/addons/MagicaVoxelImporter/points.shader @@ -14,11 +14,11 @@ uniform float show_normals : hint_range(0, 1); // This only works if the mesh was imported with "Copy Bones to UV" uniform float show_bone_weights : hint_range(0, 1); varying vec2 voxel_size; -uniform float root_scale = 1.0f; +uniform float root_scale = 1.0; uniform bool fast; uniform bool sitting; -uniform float waist = 20f; -uniform float displacement_ratio = 5f; +uniform float waist = 20.0; +uniform float displacement_ratio = 5.0; // increase lod bias to remove more voxels closer to the camera uniform float lod_bias = 1.0; // worst case lod reduction @@ -32,7 +32,7 @@ float sit(float f) { return -f/displacement_ratio; } - return 0f; + return 0.0; } void vertex() {