summaryrefslogtreecommitdiff
path: root/drivers/gles2
diff options
context:
space:
mode:
authorJFonS <joan.fonssanchez@gmail.com>2019-04-08 11:53:57 +0200
committerJFonS <joan.fonssanchez@gmail.com>2019-04-08 11:53:57 +0200
commit059078f0757575f8e7d75373e4a9430544ce4ce3 (patch)
tree960a8ad8ebec0213e8ebfe6641e60070eb73a2ab /drivers/gles2
parenta994db62df731879bb9c54e65b4ddca32396e9d3 (diff)
Fix hint_range for GLES2 shader uniforms
Diffstat (limited to 'drivers/gles2')
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
index b051c7d811..1e32d8166f 100644
--- a/drivers/gles2/rasterizer_storage_gles2.cpp
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
@@ -1557,6 +1557,10 @@ void RasterizerStorageGLES2::shader_get_param_list(RID p_shader, List<PropertyIn
case ShaderLanguage::TYPE_FLOAT: {
pi.type = Variant::REAL;
+ if (u.hint == ShaderLanguage::ShaderNode::Uniform::HINT_RANGE) {
+ pi.hint = PROPERTY_HINT_RANGE;
+ pi.hint_string = rtos(u.hint_range[0]) + "," + rtos(u.hint_range[1]) + "," + rtos(u.hint_range[2]);
+ }
} break;
case ShaderLanguage::TYPE_VEC2: {
@@ -3737,7 +3741,8 @@ void RasterizerStorageGLES2::light_set_param(RID p_light, VS::LightParam p_param
light->version++;
light->instance_change_notify(true, false);
} break;
- default: {}
+ default: {
+ }
}
light->param[p_param] = p_value;
@@ -4880,7 +4885,8 @@ void RasterizerStorageGLES2::render_target_set_flag(RID p_render_target, RenderT
_render_target_allocate(rt);
} break;
- default: {}
+ default: {
+ }
}
}