You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add custom shader attributes to Canvas Item Shaders
This commit is contained in:
@@ -2562,6 +2562,9 @@ RendererCanvasRenderRD::RendererCanvasRenderRD() {
|
||||
actions.renames["INSTANCE_ID"] = "gl_InstanceIndex";
|
||||
actions.renames["VERTEX_ID"] = "gl_VertexIndex";
|
||||
|
||||
actions.renames["CUSTOM0"] = "custom0";
|
||||
actions.renames["CUSTOM1"] = "custom1";
|
||||
|
||||
actions.renames["LIGHT_POSITION"] = "light_position";
|
||||
actions.renames["LIGHT_DIRECTION"] = "light_direction";
|
||||
actions.renames["LIGHT_IS_DIRECTIONAL"] = "is_directional";
|
||||
@@ -2583,6 +2586,8 @@ RendererCanvasRenderRD::RendererCanvasRenderRD() {
|
||||
actions.usage_defines["LIGHT"] = "#define LIGHT_SHADER_CODE_USED\n";
|
||||
actions.usage_defines["SPECULAR_SHININESS"] = "#define SPECULAR_SHININESS_USED\n";
|
||||
actions.usage_defines["POINT_SIZE"] = "#define USE_POINT_SIZE\n";
|
||||
actions.usage_defines["CUSTOM0"] = "#define CUSTOM0_USED\n";
|
||||
actions.usage_defines["CUSTOM1"] = "#define CUSTOM1_USED\n";
|
||||
|
||||
actions.render_mode_defines["skip_vertex_transform"] = "#define SKIP_TRANSFORM_USED\n";
|
||||
actions.render_mode_defines["unshaded"] = "#define MODE_UNSHADED\n";
|
||||
|
||||
Reference in New Issue
Block a user