|
Blender V5.3
|
Namespaces | |
| namespace | rt |
| namespace | visibility |
Classes | |
| struct | VertIn |
| struct | VertOut |
| struct | GeomOut |
| struct | Constants |
| struct | Resources |
| struct | GeometryShaderEmulator |
| struct | FragOut |
Functions | |
| void | vert_main (const Resources &srt, const draw::Resource &res, const int vert_id, const int inst_index, float4 &out_position) |
| void | vert_main_caps (const Resources &srt, const draw::Resource &res, const int vert_id, const int inst_index, float4 &out_position) |
| void | frag_main () |
| void | frag_debug (const Resources &srt, const bool front_facing, FragOut &frag_out) |
Extrude shadow casters along their silhouette edge. Manifold meshes only generate one quad per silhouette edge. Non-Manifold meshes generate one quad on their non manifold edges (border edges) and two quad on their silhouette edge (non-border edges) which we consider "manifold".
This shader uses line adjacency primitive to know the geometric normals of neighbor faces. A quad is generated if the faces on each sides of the edge are not facing the light the same way.
This vertex shader emulates a geometry shader. The draw call generate enough triangle for one or two quads per input primitive. Each vertex shader invocation reads the whole input primitive and execute the vertex shader code on each of the input primitive's vertices.
| void workbench::shadow::frag_debug | ( | const Resources & | srt, |
| const bool | front_facing, | ||
| FragOut & | frag_out ) |
Definition at line 402 of file workbench_shadow.bsl.hh.
References frag_debug(), front_facing, out, resource_table, and static_branch.
Referenced by frag_debug().
| void workbench::shadow::frag_main | ( | ) |
Definition at line 391 of file workbench_shadow.bsl.hh.
References frag_main().
Referenced by frag_main().
| void workbench::shadow::vert_main | ( | const Resources & | srt, |
| const draw::Resource & | res, | ||
| const int | vert_id, | ||
| const int | inst_index, | ||
| float4 & | out_position ) |
Definition at line 294 of file workbench_shadow.bsl.hh.
References workbench::shadow::GeometryShaderEmulator::geometry_main(), instance_index, NAN_FLT, workbench::shadow::GeometryShaderEmulator::out_pos, position, resource_table, static_branch, vert_main(), and vertex_id.
Referenced by vert_main().
| void workbench::shadow::vert_main_caps | ( | const Resources & | srt, |
| const draw::Resource & | res, | ||
| const int | vert_id, | ||
| const int | inst_index, | ||
| float4 & | out_position ) |
Definition at line 346 of file workbench_shadow.bsl.hh.
References workbench::shadow::GeometryShaderEmulator::geometry_main_caps(), instance_index, NAN_FLT, workbench::shadow::GeometryShaderEmulator::out_pos, position, resource_table, vert_main_caps(), and vertex_id.
Referenced by vert_main_caps().
| PipelineGraphic workbench::shadow::fail_manifold_caps(vert_main_caps, frag_main, Constants{.double_manifold=false,.shadow_pass=false}) | ( | vert_main_caps | , |
| frag_main | , | ||
| Constants{.double_manifold=false,.shadow_pass=false} | ) |
| PipelineGraphic workbench::shadow::fail_manifold_caps_debug(vert_main_caps, frag_debug, Constants{.double_manifold=false,.shadow_pass=false}) | ( | vert_main_caps | , |
| frag_debug | , | ||
| Constants{.double_manifold=false,.shadow_pass=false} | ) |
| PipelineGraphic workbench::shadow::fail_manifold_no_caps(vert_main, frag_main, Constants{.double_manifold=false,.shadow_pass=false}) | ( | vert_main | , |
| frag_main | , | ||
| Constants{.double_manifold=false,.shadow_pass=false} | ) |
| PipelineGraphic workbench::shadow::fail_manifold_no_caps_debug(vert_main, frag_debug, Constants{.double_manifold=false,.shadow_pass=false}) | ( | vert_main | , |
| frag_debug | , | ||
| Constants{.double_manifold=false,.shadow_pass=false} | ) |
| PipelineGraphic workbench::shadow::fail_no_manifold_caps(vert_main_caps, frag_main, Constants{.double_manifold=true,.shadow_pass=false}) | ( | vert_main_caps | , |
| frag_main | , | ||
| Constants{.double_manifold=true,.shadow_pass=false} | ) |
| PipelineGraphic workbench::shadow::fail_no_manifold_caps_debug(vert_main_caps, frag_debug, Constants{.double_manifold=true,.shadow_pass=false}) | ( | vert_main_caps | , |
| frag_debug | , | ||
| Constants{.double_manifold=true,.shadow_pass=false} | ) |
| PipelineGraphic workbench::shadow::fail_no_manifold_no_caps(vert_main, frag_main, Constants{.double_manifold=true,.shadow_pass=false}) | ( | vert_main | , |
| frag_main | , | ||
| Constants{.double_manifold=true,.shadow_pass=false} | ) |
| PipelineGraphic workbench::shadow::fail_no_manifold_no_caps_debug(vert_main, frag_debug, Constants{.double_manifold=true,.shadow_pass=false}) | ( | vert_main | , |
| frag_debug | , | ||
| Constants{.double_manifold=true,.shadow_pass=false} | ) |
| PipelineGraphic workbench::shadow::pass_manifold_no_caps(vert_main, frag_main, Constants{.double_manifold=false,.shadow_pass=true}) | ( | vert_main | , |
| frag_main | , | ||
| Constants{.double_manifold=false,.shadow_pass=true} | ) |
| PipelineGraphic workbench::shadow::pass_manifold_no_caps_debug(vert_main, frag_debug, Constants{.double_manifold=false,.shadow_pass=true}) | ( | vert_main | , |
| frag_debug | , | ||
| Constants{.double_manifold=false,.shadow_pass=true} | ) |
| PipelineGraphic workbench::shadow::pass_no_manifold_no_caps(vert_main, frag_main, Constants{.double_manifold=true,.shadow_pass=true}) | ( | vert_main | , |
| frag_main | , | ||
| Constants{.double_manifold=true,.shadow_pass=true} | ) |
| PipelineGraphic workbench::shadow::pass_no_manifold_no_caps_debug(vert_main, frag_debug, Constants{.double_manifold=true,.shadow_pass=true}) | ( | vert_main | , |
| frag_debug | , | ||
| Constants{.double_manifold=true,.shadow_pass=true} | ) |