diff --git a/BonVision/Primitives/DrawTexturedModel.bonsai b/BonVision/Primitives/DrawTexturedModel.bonsai
index e2b6baf..d879e84 100644
--- a/BonVision/Primitives/DrawTexturedModel.bonsai
+++ b/BonVision/Primitives/DrawTexturedModel.bonsai
@@ -1,12 +1,11 @@
-
- Draws a textured and transformed 3D model stimulus.
@@ -28,20 +27,6 @@
0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -99,6 +84,11 @@
0
+
+
+
+
+
Prepend
@@ -143,6 +133,12 @@
+
+
+
+
+
+
UpdateMaterial
@@ -285,6 +281,67 @@
+
+
+
+
+
+
+
+ TextureScaleShift
+
+
+
+ Source1
+
+
+
+
+
+
+
+ 1
+ 1
+
+
+
+
+ scale
+ TexturedModel
+
+
+
+
+
+
+
+
+ 0
+ 0
+
+
+
+
+ shift
+ TexturedModel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TexturedModel
@@ -295,37 +352,39 @@
+
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BonVision/Primitives/DrawTexturedModelArray.bonsai b/BonVision/Primitives/DrawTexturedModelArray.bonsai
index 9b0209e..9ef121e 100644
--- a/BonVision/Primitives/DrawTexturedModelArray.bonsai
+++ b/BonVision/Primitives/DrawTexturedModelArray.bonsai
@@ -1,12 +1,11 @@
-
- Draws multiple textured model instances using per-instance 4x3 transform matrix data array.
@@ -15,9 +14,6 @@
ViewMatrix
-
-
-
@@ -31,17 +27,6 @@
0
-
-
-
-
-
-
-
-
-
-
-
@@ -99,6 +84,11 @@
0
+
+
+
+
+
Prepend
@@ -143,6 +133,12 @@
+
+
+
+
+
+
UpdateMaterial
@@ -285,6 +281,64 @@
+
+
+
+
+
+
+
+ TextureScaleShift
+
+
+
+ Source1
+
+
+
+
+
+
+
+ 1
+ 1
+
+
+
+
+ scale
+ TexturedModelArray
+
+
+
+
+
+
+
+
+ 0
+ 0
+
+
+
+
+ shift
+ TexturedModelArray
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source2
@@ -294,6 +348,9 @@
Item2
+
+
+
TexturedModelArray
@@ -331,40 +388,42 @@
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
\ No newline at end of file
diff --git a/BonVision/Properties/launchSettings.json b/BonVision/Properties/launchSettings.json
index ee1d35e..d17951e 100644
--- a/BonVision/Properties/launchSettings.json
+++ b/BonVision/Properties/launchSettings.json
@@ -3,7 +3,8 @@
"Bonsai": {
"commandName": "Executable",
"executablePath": "$(registry:HKEY_CURRENT_USER\\Software\\Goncalo Lopes\\Bonsai@InstallDir)Bonsai.exe",
- "commandLineArgs": "--lib:$(TargetDir)."
+ "commandLineArgs": "--lib:$(TargetDir).",
+ "nativeDebugging": true
}
}
}
\ No newline at end of file
diff --git a/BonVision/Shaders/TexturedModel.frag b/BonVision/Shaders/TexturedModel.frag
index f745747..62c0647 100644
--- a/BonVision/Shaders/TexturedModel.frag
+++ b/BonVision/Shaders/TexturedModel.frag
@@ -1,4 +1,6 @@
#version 400
+uniform vec2 shift;
+uniform vec2 scale = vec2(1, 1);
uniform vec4 colorAmbient;
uniform vec4 colorDiffuse;
uniform vec4 colorSpecular;
@@ -15,11 +17,11 @@ void main()
vec3 L = normalize(light - position);
vec3 R = normalize(-reflect(L, normal));
vec3 V = normalize(-position);
- vec4 texel = texture(textureDiffuse, texCoord);
+ vec4 texel = texture(textureDiffuse, texCoord * scale + shift);
vec4 Iamb = colorAmbient * texel;
vec4 Idiff = colorDiffuse * vec4(texel.rgb * max(dot(normal, L), 0.0), texel.a);
vec4 Ispec = vec4(colorSpecular.rgb * pow(max(dot(R, V), 0.0), shininess), colorSpecular.a * texel.a);
fragColor = Iamb + Idiff + Ispec;
-}
+}
\ No newline at end of file