@@ -22,6 +22,8 @@ Render modes
2222+-------------------------------+------------------------------------------------------------------------------------------------------+
2323| **blend_mul ** | Multiplicative blend mode. |
2424+-------------------------------+------------------------------------------------------------------------------------------------------+
25+ | **blend_premul_alpha ** | Premultiplied alpha blend mode (fully transparent = add, fully opaque = mix). |
26+ +-------------------------------+------------------------------------------------------------------------------------------------------+
2527| **depth_draw_opaque ** | Only draw depth for opaque geometry (not transparent). |
2628+-------------------------------+------------------------------------------------------------------------------------------------------+
2729| **depth_draw_always ** | Always draw depth (opaque and transparent). |
@@ -32,55 +34,57 @@ Render modes
3234+-------------------------------+------------------------------------------------------------------------------------------------------+
3335| **depth_test_disabled ** | Disable depth testing. |
3436+-------------------------------+------------------------------------------------------------------------------------------------------+
35- | **sss_mode_skin ** | Subsurface Scattering mode for skin. |
37+ | **sss_mode_skin ** | Subsurface Scattering mode for skin (optimizes visuals for human skin, e.g. boosted red channel). |
3638+-------------------------------+------------------------------------------------------------------------------------------------------+
3739| **cull_back ** | Cull back-faces (default). |
3840+-------------------------------+------------------------------------------------------------------------------------------------------+
3941| **cull_front ** | Cull front-faces. |
4042+-------------------------------+------------------------------------------------------------------------------------------------------+
4143| **cull_disabled ** | Culling disabled (double sided). |
4244+-------------------------------+------------------------------------------------------------------------------------------------------+
43- | **unshaded ** | Result is just albedo. No lighting/shading happens in material. |
45+ | **unshaded ** | Result is just albedo. No lighting/shading happens in material, making it faster to render. |
46+ +-------------------------------+------------------------------------------------------------------------------------------------------+
47+ | **wireframe ** | Geometry draws using lines (useful for troubleshooting). |
4448+-------------------------------+------------------------------------------------------------------------------------------------------+
45- | **wireframe ** | Geometry draws using lines. |
49+ | **debug_shadow_splits ** | Directional shadows are drawn using different colors for each split (useful for troubleshooting). |
4650+-------------------------------+------------------------------------------------------------------------------------------------------+
4751| **diffuse_burley ** | Burley (Disney PBS) for diffuse (default). |
4852+-------------------------------+------------------------------------------------------------------------------------------------------+
4953| **diffuse_lambert ** | Lambert shading for diffuse. |
5054+-------------------------------+------------------------------------------------------------------------------------------------------+
51- | **diffuse_lambert_wrap ** | Lambert wrapping (roughness dependent) for diffuse. |
55+ | **diffuse_lambert_wrap ** | Lambert-wrap shading (roughness- dependent) for diffuse. |
5256+-------------------------------+------------------------------------------------------------------------------------------------------+
5357| **diffuse_toon ** | Toon shading for diffuse. |
5458+-------------------------------+------------------------------------------------------------------------------------------------------+
55- | **specular_schlick_ggx ** | Schlick-GGX for specular (default). |
59+ | **specular_schlick_ggx ** | Schlick-GGX for direct light specular lobes (default). |
5660+-------------------------------+------------------------------------------------------------------------------------------------------+
57- | **specular_toon ** | Toon for specular. |
61+ | **specular_toon ** | Toon for direct light specular lobes. |
5862+-------------------------------+------------------------------------------------------------------------------------------------------+
59- | **specular_disabled ** | Disable specular. |
63+ | **specular_disabled ** | Disable direct light specular lobes. |
6064+-------------------------------+------------------------------------------------------------------------------------------------------+
61- | **skip_vertex_transform ** | VERTEX/ NORMAL/etc. need to be transformed manually in vertex function. |
65+ | **skip_vertex_transform ** | `` VERTEX ``/`` NORMAL `` /etc. need to be transformed manually in the `` vertex() `` function. |
6266+-------------------------------+------------------------------------------------------------------------------------------------------+
63- | **world_vertex_coords ** | VERTEX/ NORMAL/etc. are modified in world coordinates instead of local. |
67+ | **world_vertex_coords ** | `` VERTEX ``/`` NORMAL `` /etc. are modified in world coordinates instead of local. |
6468+-------------------------------+------------------------------------------------------------------------------------------------------+
65- | **ensure_correct_normals ** | Use when non-uniform scale is applied to mesh. |
69+ | **ensure_correct_normals ** | Use when non-uniform scale is applied to mesh * (note: currently unimplemented) *. |
6670+-------------------------------+------------------------------------------------------------------------------------------------------+
67- | **shadows_disabled ** | Disable computing shadows in shader. |
71+ | **shadows_disabled ** | Disable computing shadows in shader. The shader will not cast shadows, but can still receive them. |
6872+-------------------------------+------------------------------------------------------------------------------------------------------+
6973| **ambient_light_disabled ** | Disable contribution from ambient light and radiance map. |
7074+-------------------------------+------------------------------------------------------------------------------------------------------+
7175| **shadow_to_opacity ** | Lighting modifies the alpha so shadowed areas are opaque and |
7276| | non-shadowed areas are transparent. Useful for overlaying shadows onto |
7377| | a camera feed in AR. |
7478+-------------------------------+------------------------------------------------------------------------------------------------------+
75- | **vertex_lighting ** | Use vertex-based lighting. |
79+ | **vertex_lighting ** | Use vertex-based lighting * (note: currently unimplemented) *. |
7680+-------------------------------+------------------------------------------------------------------------------------------------------+
7781| **particle_trails ** | Enables the trails when used on particles geometry. |
7882+-------------------------------+------------------------------------------------------------------------------------------------------+
7983| **alpha_to_coverage ** | Alpha antialiasing mode, see `here <https://github.com/godotengine/godot/pull/40364 >`_ for more. |
8084+-------------------------------+------------------------------------------------------------------------------------------------------+
8185| **alpha_to_coverage_and_one ** | Alpha antialiasing mode, see `here <https://github.com/godotengine/godot/pull/40364 >`_ for more. |
8286+-------------------------------+------------------------------------------------------------------------------------------------------+
83- | **fog_disabled ** | Disable receiving depth-based or volumetric fog. Useful for blend_add materials like particles. |
87+ | **fog_disabled ** | Disable receiving depth-based or volumetric fog. Useful for `` blend_add `` materials like particles. |
8488+-------------------------------+------------------------------------------------------------------------------------------------------+
8589
8690Built-ins
@@ -347,6 +351,10 @@ these properties, and if you don't write to them, Godot will optimize away the c
347351+----------------------------------------+--------------------------------------------------------------------------------------------------+
348352| out vec2 **ALPHA_TEXTURE_COORDINATE ** | |
349353+----------------------------------------+--------------------------------------------------------------------------------------------------+
354+ | out float **PREMUL_ALPHA_FACTOR ** | Premultiplied alpha factor. Only effective if ``render_mode blend_premul_alpha; `` is used. |
355+ | | This should be written to when using a *shaded * material with premultiplied alpha blending for |
356+ | | interaction with lighting. This is not required for unshaded materials. |
357+ +----------------------------------------+--------------------------------------------------------------------------------------------------+
350358| out float **METALLIC ** | Metallic (0..1). |
351359+----------------------------------------+--------------------------------------------------------------------------------------------------+
352360| out float **SPECULAR ** | Specular. Defaults to 0.5, best not to modify unless you want to change IOR. |
0 commit comments