mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
-Fixed shader lang to not be able to get scalar from matrix (ie mat.x), to make it more GLSL compatible
-Fixed referencing of world_transform in fragment shader not working -Fixed unsycn bug related to getting shader param list from the server -Fixed getting all textures from shader properly, fixes #8353
This commit is contained in:
parent
9757fc354c
commit
2da3f48e5a
@ -1556,7 +1556,11 @@ void RasterizerStorageGLES3::shader_get_param_list(RID p_shader, List<PropertyIn
|
||||
|
||||
for (Map<StringName, ShaderLanguage::ShaderNode::Uniform>::Element *E = shader->uniforms.front(); E; E = E->next()) {
|
||||
|
||||
order[E->get().order] = E->key();
|
||||
if (E->get().texture_order >= 0) {
|
||||
order[E->get().texture_order + 100000] = E->key();
|
||||
} else {
|
||||
order[E->get().order] = E->key();
|
||||
}
|
||||
}
|
||||
|
||||
for (Map<int, StringName>::Element *E = order.front(); E; E = E->next()) {
|
||||
|
@ -368,6 +368,8 @@ VERTEX_SHADER_CODE
|
||||
|
||||
*/
|
||||
|
||||
uniform highp mat4 world_transform;
|
||||
|
||||
#define M_PI 3.14159265359
|
||||
|
||||
/* Varyings */
|
||||
|
@ -1370,8 +1370,6 @@ void SpatialMaterial::_bind_methods() {
|
||||
BIND_CONSTANT(BILLBOARD_ENABLED);
|
||||
BIND_CONSTANT(BILLBOARD_FIXED_Y);
|
||||
BIND_CONSTANT(BILLBOARD_PARTICLES);
|
||||
|
||||
|
||||
}
|
||||
|
||||
SpatialMaterial::SpatialMaterial()
|
||||
|
@ -2549,12 +2549,14 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
|
||||
|
||||
} break;
|
||||
|
||||
default: {}
|
||||
default: {
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ok) {
|
||||
|
||||
_set_error("Invalid member for expression: ." + ident);
|
||||
_set_error("Invalid member for " + get_datatype_name(dt) + " expression: ." + ident);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
FUNC2(shader_set_code, RID, const String &)
|
||||
FUNC1RC(String, shader_get_code, RID)
|
||||
|
||||
FUNC2C(shader_get_param_list, RID, List<PropertyInfo> *)
|
||||
FUNC2SC(shader_get_param_list, RID, List<PropertyInfo> *)
|
||||
|
||||
FUNC3(shader_set_default_texture_param, RID, const StringName &, RID)
|
||||
FUNC2RC(RID, shader_get_default_texture_param, RID, const StringName &)
|
||||
|
Loading…
Reference in New Issue
Block a user