You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Avoid double underscore from breaking glsl compiler, fixes #12880
This commit is contained in:
@@ -80,11 +80,8 @@ static String _opstr(SL::Operator p_op) {
|
|||||||
|
|
||||||
static String _mkid(const String &p_id) {
|
static String _mkid(const String &p_id) {
|
||||||
|
|
||||||
StringBuffer<> id;
|
String id = "m_" + p_id;
|
||||||
id += "m_";
|
return id.replace("__", "_dus_"); //doubleunderscore is reserverd in glsl
|
||||||
id += p_id;
|
|
||||||
|
|
||||||
return id.as_string();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static String f2sp0(float p_float) {
|
static String f2sp0(float p_float) {
|
||||||
|
|||||||
@@ -167,7 +167,8 @@ static String _opstr(SL::Operator p_op) {
|
|||||||
|
|
||||||
static String _mkid(const String &p_id) {
|
static String _mkid(const String &p_id) {
|
||||||
|
|
||||||
return "m_" + p_id;
|
String id = "m_" + p_id;
|
||||||
|
return id.replace("__", "_dus_"); //doubleunderscore is reserverd in glsl
|
||||||
}
|
}
|
||||||
|
|
||||||
static String f2sp0(float p_float) {
|
static String f2sp0(float p_float) {
|
||||||
|
|||||||
Reference in New Issue
Block a user