From 8fa723ed40ee983a58bec7463cfdb0292d193610 Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Sat, 31 Oct 2020 07:32:47 -0700 Subject: [PATCH] GLSL precision and errors. --- drivers/gles3/shaders/blend_shape.glsl | 2 +- drivers/gles3/shaders/scene.glsl | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gles3/shaders/blend_shape.glsl b/drivers/gles3/shaders/blend_shape.glsl index a1e954e33d2f..c85db7117cc7 100644 --- a/drivers/gles3/shaders/blend_shape.glsl +++ b/drivers/gles3/shaders/blend_shape.glsl @@ -103,7 +103,7 @@ out vec2 uv2_out; //tfb:ENABLE_UV2 #endif #ifdef ENABLE_SKELETON -out ivec4 bone_out; //tfb:ENABLE_SKELETON +flat out ivec4 bone_out; //tfb:ENABLE_SKELETON out vec4 weight_out; //tfb:ENABLE_SKELETON #endif diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index 31d9a87875f4..7778e77ed52a 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -114,7 +114,7 @@ uniform highp mat4 world_transform; layout(std140) uniform DirectionalLightData { //ubo:3 highp vec4 light_pos_inv_radius; - mediump vec4 light_direction_attenuation; + highp vec4 light_direction_attenuation; mediump vec4 light_color_energy; mediump vec4 light_params; // cone attenuation, angle, specular, shadow enabled, mediump vec4 light_clamp; @@ -134,7 +134,7 @@ layout(std140) uniform DirectionalLightData { //ubo:3 struct LightData { highp vec4 light_pos_inv_radius; - mediump vec4 light_direction_attenuation; + highp vec4 light_direction_attenuation; mediump vec4 light_color_energy; mediump vec4 light_params; // cone attenuation, angle, specular, shadow enabled, mediump vec4 light_clamp; @@ -753,7 +753,7 @@ layout(std140) uniform SceneData { layout(std140) uniform DirectionalLightData { highp vec4 light_pos_inv_radius; - mediump vec4 light_direction_attenuation; + highp vec4 light_direction_attenuation; mediump vec4 light_color_energy; mediump vec4 light_params; // cone attenuation, angle, specular, shadow enabled, mediump vec4 light_clamp; @@ -778,7 +778,7 @@ in vec4 specular_light_interp; struct LightData { highp vec4 light_pos_inv_radius; - mediump vec4 light_direction_attenuation; + highp vec4 light_direction_attenuation; mediump vec4 light_color_energy; mediump vec4 light_params; // cone attenuation, angle, specular, shadow enabled, mediump vec4 light_clamp; @@ -866,7 +866,7 @@ vec3 GET_LIGHT_DIRECTION(LightData ld) { } float GET_LIGHT_SIZE_PARAM(LightData ld) { - return 0; + return 0.0; } float GET_LIGHT_ATTENUATION_PARAM(LightData ld) {