[Bf-blender-cvs] [077e310] HMD_viewport: Correction to previos commit: Use int for region size
Julian Eisel
noreply at git.blender.org
Wed Apr 13 00:52:10 CEST 2016
Commit: 077e3109c81b9f07ad25abe5ab0f75152a8d31c5
Author: Julian Eisel
Date: Wed Apr 13 00:51:32 2016 +0200
Branches: HMD_viewport
https://developer.blender.org/rB077e3109c81b9f07ad25abe5ab0f75152a8d31c5
Correction to previos commit: Use int for region size
===================================================================
M source/blender/gpu/intern/gpu_compositing.c
M source/blender/gpu/shaders/gpu_shader_fx_lensdistortion_frag.glsl
===================================================================
diff --git a/source/blender/gpu/intern/gpu_compositing.c b/source/blender/gpu/intern/gpu_compositing.c
index 06514c2..63fd55b 100644
--- a/source/blender/gpu/intern/gpu_compositing.c
+++ b/source/blender/gpu/intern/gpu_compositing.c
@@ -1300,11 +1300,11 @@ bool GPU_fx_do_composite_pass(
if (lensdist_shader) {
const int color_uniform = GPU_shader_get_uniform(lensdist_shader, "warpTexture");
const int regionsize_uniform = GPU_shader_get_uniform(lensdist_shader, "RegionSize");
- const float region_size_f[2] = {UNPACK2(region_size)};
+ const int region_size_i[2] = {UNPACK2(region_size)};
GPU_shader_bind(lensdist_shader);
- GPU_shader_uniform_vector(lensdist_shader, regionsize_uniform, 2, 1, region_size_f);
+ GPU_shader_uniform_vector_int(lensdist_shader, regionsize_uniform, 2, 1, region_size_i);
GPU_texture_bind(src, numslots++);
GPU_shader_uniform_texture(lensdist_shader, color_uniform, src);
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_lensdistortion_frag.glsl b/source/blender/gpu/shaders/gpu_shader_fx_lensdistortion_frag.glsl
index c32f1aa..7ffed0b 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_lensdistortion_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_lensdistortion_frag.glsl
@@ -1,4 +1,4 @@
-uniform vec2 RegionSize;
+uniform ivec2 RegionSize;
uniform sampler2D warpTexture;
const vec2 LeftLensCenter = vec2(0.25, 0.5);
More information about the Bf-blender-cvs
mailing list