You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Use C++11 raw literals for shader code to improve readability
In files that have lots of branching, `\t` was replaced with a tab character instead.
This commit is contained in:
@@ -77,16 +77,17 @@ void Texture3DEditor::_update_material() {
|
||||
}
|
||||
|
||||
void Texture3DEditor::_make_shaders() {
|
||||
String shader_3d = ""
|
||||
"shader_type canvas_item;\n"
|
||||
"uniform sampler3D tex;\n"
|
||||
"uniform float layer;\n"
|
||||
"void fragment() {\n"
|
||||
" COLOR = textureLod(tex,vec3(UV,layer),0.0);\n"
|
||||
"}";
|
||||
|
||||
shader.instantiate();
|
||||
shader->set_code(shader_3d);
|
||||
shader->set_code(R"(
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform sampler3D tex;
|
||||
uniform float layer;
|
||||
|
||||
void fragment() {
|
||||
COLOR = textureLod(tex, vec3(UV, layer), 0.0);
|
||||
}
|
||||
)");
|
||||
material.instantiate();
|
||||
material->set_shader(shader);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user