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/draw/engines/workbench/shaders/workbench_volume_vert.glsl')
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_volume_vert.glsl26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_volume_vert.glsl b/source/blender/draw/engines/workbench/shaders/workbench_volume_vert.glsl
index 7ce21c3d5ca..7a418243fd3 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_volume_vert.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_volume_vert.glsl
@@ -15,19 +15,19 @@ out vec3 localPos;
void main()
{
#ifdef VOLUME_SLICE
- if (sliceAxis == 0) {
- localPos = vec3(slicePosition * 2.0 - 1.0, pos.xy);
- }
- else if (sliceAxis == 1) {
- localPos = vec3(pos.x, slicePosition * 2.0 - 1.0, pos.y);
- }
- else {
- localPos = vec3(pos.xy, slicePosition * 2.0 - 1.0);
- }
- vec3 final_pos = localPos;
+ if (sliceAxis == 0) {
+ localPos = vec3(slicePosition * 2.0 - 1.0, pos.xy);
+ }
+ else if (sliceAxis == 1) {
+ localPos = vec3(pos.x, slicePosition * 2.0 - 1.0, pos.y);
+ }
+ else {
+ localPos = vec3(pos.xy, slicePosition * 2.0 - 1.0);
+ }
+ vec3 final_pos = localPos;
#else
- vec3 final_pos = pos;
+ vec3 final_pos = pos;
#endif
- final_pos = ((final_pos * 0.5 + 0.5) - OrcoTexCoFactors[0]) / OrcoTexCoFactors[1];
- gl_Position = ModelViewProjectionMatrix * vec4(final_pos, 1.0);
+ final_pos = ((final_pos * 0.5 + 0.5) - OrcoTexCoFactors[0]) / OrcoTexCoFactors[1];
+ gl_Position = ModelViewProjectionMatrix * vec4(final_pos, 1.0);
}