You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
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.
This commit is contained in:
@@ -855,6 +855,8 @@ void RendererSceneSkyRD::init(RendererStorageRD *p_storage) {
|
||||
storage->shader_initialize(sky_shader.default_shader);
|
||||
|
||||
storage->shader_set_code(sky_shader.default_shader, R"(
|
||||
// Default sky shader.
|
||||
|
||||
shader_type sky;
|
||||
|
||||
void sky() {
|
||||
@@ -942,6 +944,8 @@ void sky() {
|
||||
storage->shader_initialize(sky_scene_state.fog_shader);
|
||||
|
||||
storage->shader_set_code(sky_scene_state.fog_shader, R"(
|
||||
// Default clear color sky shader.
|
||||
|
||||
shader_type sky;
|
||||
|
||||
uniform vec4 clear_color;
|
||||
|
||||
Reference in New Issue
Block a user