Fix T97827: material preview not displaying textures
Caused by rB281bcc1c1dd6 which did not properly made use of `vec4` for UVs which are now loaded as attributes.
This commit is contained in:
parent
cbeb8770cc
commit
d86d7c935e
@ -5,6 +5,13 @@ void differentiate_texco(vec3 v, out vec3 df)
|
||||
df = v + dF_impl(v);
|
||||
}
|
||||
|
||||
/* Overload for UVs which are loaded as generic attributes. */
|
||||
void differentiate_texco(vec4 v, out vec3 df)
|
||||
{
|
||||
/* Implementation defined. */
|
||||
df = v.xyz + dF_impl(v.xyz);
|
||||
}
|
||||
|
||||
void node_bump(
|
||||
float strength, float dist, float height, vec3 N, vec2 dHd, float invert, out vec3 result)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
void node_tex_coord(mat4 obmatinv,
|
||||
vec3 attr_orco,
|
||||
vec3 attr_uv,
|
||||
vec4 attr_uv,
|
||||
out vec3 generated,
|
||||
out vec3 normal,
|
||||
out vec3 uv,
|
||||
@ -12,7 +12,7 @@ void node_tex_coord(mat4 obmatinv,
|
||||
{
|
||||
generated = attr_orco;
|
||||
normal = normal_world_to_object(g_data.N);
|
||||
uv = attr_uv;
|
||||
uv = attr_uv.xyz;
|
||||
object = transform_point((obmatinv[3][3] == 0.0) ? ModelMatrixInverse : obmatinv, g_data.P);
|
||||
camera = coordinate_camera(g_data.P);
|
||||
window = coordinate_screen(g_data.P);
|
||||
|
Loading…
Reference in New Issue
Block a user