Skip to content

Commit 1c56bc4

Browse files
committed
fix
Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent d300a4c commit 1c56bc4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/testshade/rs_simplerend.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ rs_texture(OSL::OpaqueExecContextPtr ec, OSL::ustringhash filename,
211211
return false;
212212
const float4 fromTexture = osl_tex2DLookup(texture_handle, s, t, dsdx, dtdx,
213213
dsdy, dtdy);
214-
*((float3*)result) = make_float3(fromTexture.x, fromTexture.y,
215-
fromTexture.z);
214+
for (int c = 0; c < nchannels; ++c)
215+
result[c] = ((const float*)&fromTexture)[c];
216216
return true;
217217
#endif
218218
}

0 commit comments

Comments
 (0)