diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-08-18 03:09:22 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-08-18 03:09:22 +0200 |
commit | a139e58f8c804d97ecff57b24911840305510687 (patch) | |
tree | 1c842d9d10ced84ec5eda61a077136721c37711c /scene | |
parent | b463ac747a22371136b426b42de03fd900a45cd8 (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 'scene')
-rw-r--r-- | scene/gui/color_picker.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 261480bcdd..534518db28 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -98,6 +98,8 @@ Ref<Shader> ColorPicker::circle_shader; void ColorPicker::init_shaders() { wheel_shader.instantiate(); wheel_shader->set_code(R"( +// ColorPicker wheel shader. + shader_type canvas_item; void fragment() { @@ -120,6 +122,8 @@ void fragment() { circle_shader.instantiate(); circle_shader->set_code(R"( +// ColorPicker circle shader. + shader_type canvas_item; uniform float v = 1.0; |