mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #51821 from Calinou/builtin-shaders-add-comments
Add comments at the top of each built-in shader to ease debugging
This commit is contained in:
commit
c334989e00
10 changed files with 38 additions and 0 deletions
|
|
@ -5598,6 +5598,8 @@ void Node3DEditor::_init_indicators() {
|
|||
|
||||
Ref<Shader> grid_shader = memnew(Shader);
|
||||
grid_shader->set_code(R"(
|
||||
// 3D editor grid shader.
|
||||
|
||||
shader_type spatial;
|
||||
|
||||
render_mode unshaded;
|
||||
|
|
@ -5839,6 +5841,8 @@ void fragment() {
|
|||
Ref<Shader> rotate_shader = memnew(Shader);
|
||||
|
||||
rotate_shader->set_code(R"(
|
||||
// 3D editor rotation manipulator gizmo shader.
|
||||
|
||||
shader_type spatial;
|
||||
|
||||
render_mode unshaded, depth_test_disabled;
|
||||
|
|
@ -5887,6 +5891,8 @@ void fragment() {
|
|||
|
||||
Ref<Shader> border_shader = memnew(Shader);
|
||||
border_shader->set_code(R"(
|
||||
// 3D editor rotation manipulator gizmo shader (white outline).
|
||||
|
||||
shader_type spatial;
|
||||
|
||||
render_mode unshaded, depth_test_disabled;
|
||||
|
|
@ -7506,6 +7512,8 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) {
|
|||
|
||||
sun_direction_shader.instantiate();
|
||||
sun_direction_shader->set_code(R"(
|
||||
// 3D editor Preview Sun direction shader.
|
||||
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform vec3 sun_direction;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue