From 7424ded9c7d842cf56f677607d7a3c5c1562b687 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 26 May 2016 18:46:12 +1000 Subject: Cleanup: glsl style --- intern/opencolorio/gpu_shader_display_transform.glsl | 2 +- intern/opensubdiv/gpu_shader_opensubd_display.glsl | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'intern') diff --git a/intern/opencolorio/gpu_shader_display_transform.glsl b/intern/opencolorio/gpu_shader_display_transform.glsl index 5921d6d9c73..853bf575582 100644 --- a/intern/opencolorio/gpu_shader_display_transform.glsl +++ b/intern/opencolorio/gpu_shader_display_transform.glsl @@ -38,7 +38,7 @@ float read_curve_mapping(int table, int index) * But is it actually correct to subtract 1 here? */ float texture_index = float(index) / float(curve_mapping_lut_size - 1); - return texture1D(curve_mapping_texture, texture_index) [table]; + return texture1D(curve_mapping_texture, texture_index)[table]; } float curvemap_calc_extend(int table, float x, vec2 first, vec2 last) diff --git a/intern/opensubdiv/gpu_shader_opensubd_display.glsl b/intern/opensubdiv/gpu_shader_opensubd_display.glsl index 51e8ed46c34..a17dcef81c7 100644 --- a/intern/opensubdiv/gpu_shader_opensubd_display.glsl +++ b/intern/opensubdiv/gpu_shader_opensubd_display.glsl @@ -111,7 +111,7 @@ void emit(int index, vec3 normal) outpt.v.normal = normal; /* TODO(sergey): Only uniform subdivisions atm. */ - vec2 quadst[4] = vec2[](vec2(0,0), vec2(1,0), vec2(1,1), vec2(0,1)); + vec2 quadst[4] = vec2[](vec2(0, 0), vec2(1, 0), vec2(1, 1), vec2(0, 1)); vec2 st = quadst[index]; INTERP_FACE_VARYING_2(outpt.v.uv, osd_active_uv_offset, st); @@ -135,7 +135,7 @@ void emit(int index) outpt.v.normal = inpt[index].v.normal; /* TODO(sergey): Only uniform subdivisions atm. */ - vec2 quadst[4] = vec2[](vec2(0,0), vec2(1,0), vec2(1,1), vec2(0,1)); + vec2 quadst[4] = vec2[](vec2(0, 0), vec2(1, 0), vec2(1, 1), vec2(0, 1)); vec2 st = quadst[index]; INTERP_FACE_VARYING_2(outpt.v.uv, osd_active_uv_offset, st); @@ -261,7 +261,7 @@ void main() #else /* USE_COLOR_MATERIAL */ vec3 varying_position = inpt.v.position.xyz; vec3 V = (gl_ProjectionMatrix[3][3] == 0.0) ? - normalize(varying_position): vec3(0.0, 0.0, -1.0); + normalize(varying_position) : vec3(0.0, 0.0, -1.0); for (int i = 0; i < num_enabled_lights; i++) { /* todo: this is a slow check for disabled lights */ if (lightSource[i].specular.a == 0.0) @@ -299,7 +299,7 @@ void main() /* diffuse light */ vec3 light_diffuse = lightSource[i].diffuse.rgb; float diffuse_bsdf = max(dot(N, light_direction), 0.0); - L_diffuse += light_diffuse*diffuse_bsdf*intensity; + L_diffuse += light_diffuse * diffuse_bsdf * intensity; /* specular light */ vec3 light_specular = lightSource[i].specular.rgb; @@ -307,7 +307,7 @@ void main() float specular_bsdf = pow(max(dot(N, H), 0.0), gl_FrontMaterial.shininess); - L_specular += light_specular*specular_bsdf * intensity; + L_specular += light_specular * specular_bsdf * intensity; } #endif /* USE_COLOR_MATERIAL */ -- cgit v1.2.3