owl-project / NVISII

Apache License 2.0
327 stars 28 forks source link

allow to rotate inplane 2d textures #106

Open TontonTremblay opened 3 years ago

TontonTremblay commented 3 years ago

Would it be possible to do in-plane rotation of a texture, could be define by a single number [0..360].

natevm commented 3 years ago

We’d probably add this using an API similar to the texture.set_scale function here: https://nvisii.com/texture.html#nvisii.texture.set_scale

under the hood, we’d probably want to change from the vec2f scale we have in the texture struct sent to the GPU to a mat3f that can translate, rotate, and scale.