Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_instance_camera_vert.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_instance_camera_vert.glsl66
1 files changed, 33 insertions, 33 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_instance_camera_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_camera_vert.glsl
index 6a6da3dd104..31b359dbe6d 100644
--- a/source/blender/gpu/shaders/gpu_shader_instance_camera_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_instance_camera_vert.glsl
@@ -18,40 +18,40 @@ flat out vec4 finalColor;
void main()
{
- vec3 pPos;
-
- if (pos == 1.0) {
- pPos = vec3(corners[0].xy, depth);
- }
- else if (pos == 2.0) {
- pPos = vec3(corners[0].zw, depth);
- }
- else if (pos == 3.0) {
- pPos = vec3(corners[1].xy, depth);
- }
- else if (pos == 4.0) {
- pPos = vec3(corners[1].zw, depth);
- }
- else if (pos == 5.0) {
- pPos = vec3(tria.xy, depth);
- }
- else if (pos == 6.0) {
- vec2 ofs = tria.xy - corners[0].xy;
- ofs.x = -ofs.x;
- pPos = vec3(corners[1].zw + ofs, depth);
- }
- else if (pos == 7.0) {
- pPos = vec3(tria.zw, depth);
- }
- else {
- pPos = vec3(0.0);
- }
-
- gl_Position = ViewProjectionMatrix * InstanceModelMatrix * vec4(pPos, 1.0);
-
- finalColor = vec4(color, 1.0);
+ vec3 pPos;
+
+ if (pos == 1.0) {
+ pPos = vec3(corners[0].xy, depth);
+ }
+ else if (pos == 2.0) {
+ pPos = vec3(corners[0].zw, depth);
+ }
+ else if (pos == 3.0) {
+ pPos = vec3(corners[1].xy, depth);
+ }
+ else if (pos == 4.0) {
+ pPos = vec3(corners[1].zw, depth);
+ }
+ else if (pos == 5.0) {
+ pPos = vec3(tria.xy, depth);
+ }
+ else if (pos == 6.0) {
+ vec2 ofs = tria.xy - corners[0].xy;
+ ofs.x = -ofs.x;
+ pPos = vec3(corners[1].zw + ofs, depth);
+ }
+ else if (pos == 7.0) {
+ pPos = vec3(tria.zw, depth);
+ }
+ else {
+ pPos = vec3(0.0);
+ }
+
+ gl_Position = ViewProjectionMatrix * InstanceModelMatrix * vec4(pPos, 1.0);
+
+ finalColor = vec4(color, 1.0);
#ifdef USE_WORLD_CLIP_PLANES
- world_clip_planes_calc_clip_distance((ModelMatrix * InstanceModelMatrix * vec4(pPos, 1.0)).xyz);
+ world_clip_planes_calc_clip_distance((ModelMatrix * InstanceModelMatrix * vec4(pPos, 1.0)).xyz);
#endif
}