Differential D13910 Diff 47394 source/blender/draw/engines/workbench/shaders/workbench_shadow_vert.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/shaders/workbench_shadow_vert.glsl
| #define INFINITE 1000.0 | |||||
| uniform vec3 lightDirection = vec3(0.57, 0.57, -0.57); | #pragma BLENDER_REQUIRE(common_view_lib.glsl) | ||||
| uniform float lightDistance = 1e4; | |||||
| in vec3 pos; | |||||
| out VertexData | |||||
| { | |||||
| vec3 pos; /* local position */ | |||||
| vec4 frontPosition; /* final ndc position */ | |||||
| vec4 backPosition; | |||||
| } | |||||
| vData; | |||||
| void main() | void main() | ||||
| { | { | ||||
| vData.pos = pos; | vData.pos = pos; | ||||
| vData.frontPosition = point_object_to_ndc(pos); | vData.frontPosition = point_object_to_ndc(pos); | ||||
| vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance); | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance); | ||||
| } | } | ||||