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:
authorJacques Lucke <jacques@blender.org>2020-10-01 17:56:24 +0300
committerJacques Lucke <jacques@blender.org>2020-10-01 17:57:00 +0300
commit958fc6944f75f51b9fe5b47f29ff82156b3c6286 (patch)
tree0f5b52f18461713b541e20a57c679cdb301d0b1a /source/blender/render
parent83980506957cd4e31e8dc7041672efb256b5c28c (diff)
Cleanup: make texture coordinates const
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/extern/include/RE_shader_ext.h4
-rw-r--r--source/blender/render/intern/source/render_texture.c14
2 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/render/extern/include/RE_shader_ext.h b/source/blender/render/extern/include/RE_shader_ext.h
index dc41afee938..d9d5a924949 100644
--- a/source/blender/render/extern/include/RE_shader_ext.h
+++ b/source/blender/render/extern/include/RE_shader_ext.h
@@ -61,14 +61,14 @@ int multitex_ext(struct Tex *tex,
const bool skip_load_image);
/* nodes disabled */
int multitex_ext_safe(struct Tex *tex,
- float texvec[3],
+ const float texvec[3],
struct TexResult *texres,
struct ImagePool *pool,
bool scene_color_manage,
const bool skip_load_image);
/* only for internal node usage */
int multitex_nodes(struct Tex *tex,
- float texvec[3],
+ const float texvec[3],
float dxt[3],
float dyt[3],
int osatex,
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index e5c62dbd784..12abc0f9216 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -1150,7 +1150,7 @@ static void do_2d_mapping(
/* ************************************** */
static int multitex(Tex *tex,
- float texvec[3],
+ const float texvec[3],
float dxt[3],
float dyt[3],
int osatex,
@@ -1280,7 +1280,7 @@ static int multitex(Tex *tex,
}
static int multitex_nodes_intern(Tex *tex,
- float texvec[3],
+ const float texvec[3],
float dxt[3],
float dyt[3],
int osatex,
@@ -1307,10 +1307,12 @@ static int multitex_nodes_intern(Tex *tex,
int rgbnor;
if (mtex) {
+ float texvec_l[3];
+ copy_v3_v3(texvec_l, texvec);
/* we have mtex, use it for 2d mapping images only */
- do_2d_mapping(mtex, texvec, NULL, dxt, dyt);
+ do_2d_mapping(mtex, texvec_l, NULL, dxt, dyt);
rgbnor = multitex(tex,
- texvec,
+ texvec_l,
dxt,
dyt,
osatex,
@@ -1400,7 +1402,7 @@ static int multitex_nodes_intern(Tex *tex,
* Use it from render pipeline only!
*/
int multitex_nodes(Tex *tex,
- float texvec[3],
+ const float texvec[3],
float dxt[3],
float dyt[3],
int osatex,
@@ -1465,7 +1467,7 @@ int multitex_ext(Tex *tex,
* Use it for stuff which is out of render pipeline.
*/
int multitex_ext_safe(Tex *tex,
- float texvec[3],
+ const float texvec[3],
TexResult *texres,
struct ImagePool *pool,
bool scene_color_manage,