summaryrefslogtreecommitdiff
path: root/editor/plugins/texture_layered_editor_plugin.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-08-18 03:09:22 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-08-18 03:09:22 +0200
commita139e58f8c804d97ecff57b24911840305510687 (patch)
tree1c842d9d10ced84ec5eda61a077136721c37711c /editor/plugins/texture_layered_editor_plugin.cpp
parentb463ac747a22371136b426b42de03fd900a45cd8 (diff)
Add comments at the top of each built-in shader to ease debugging
When a shader error is printed about a built-in shader, the origin of the shader will now be recognizable immediately by looking at the top of the printed shader code.
Diffstat (limited to 'editor/plugins/texture_layered_editor_plugin.cpp')
-rw-r--r--editor/plugins/texture_layered_editor_plugin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index 80359452ac..7cd0a69752 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -106,6 +106,8 @@ void TextureLayeredEditor::_update_material() {
void TextureLayeredEditor::_make_shaders() {
shaders[0].instantiate();
shaders[0]->set_code(R"(
+// TextureLayeredEditor preview shader (2D array).
+
shader_type canvas_item;
uniform sampler2DArray tex;
@@ -118,6 +120,8 @@ void fragment() {
shaders[1].instantiate();
shaders[1]->set_code(R"(
+// TextureLayeredEditor preview shader (cubemap).
+
shader_type canvas_item;
uniform samplerCube tex;
@@ -132,6 +136,8 @@ void fragment() {
shaders[2].instantiate();
shaders[2]->set_code(R"(
+// TextureLayeredEditor preview shader (cubemap array).
+
shader_type canvas_item;
uniform samplerCubeArray tex;