mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +00:00
Add option to use world coordinates in canvas item shader
By using the render mode `world_vertex_coords` you can automatically use the vertex coordinates in world space
This commit is contained in:
parent
d2f76e8786
commit
c98ab5aba3
5 changed files with 13 additions and 2 deletions
|
|
@ -2480,6 +2480,7 @@ RendererCanvasRenderRD::RendererCanvasRenderRD() {
|
|||
actions.render_mode_defines["skip_vertex_transform"] = "#define SKIP_TRANSFORM_USED\n";
|
||||
actions.render_mode_defines["unshaded"] = "#define MODE_UNSHADED\n";
|
||||
actions.render_mode_defines["light_only"] = "#define MODE_LIGHT_ONLY\n";
|
||||
actions.render_mode_defines["world_vertex_coords"] = "#define USE_WORLD_VERTEX_COORDS\n";
|
||||
|
||||
actions.custom_samplers["TEXTURE"] = "texture_sampler";
|
||||
actions.custom_samplers["NORMAL_TEXTURE"] = "texture_sampler";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue