Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Could anyone explain this math?

$
0
0
vec3 i = floor(v + dot(v, C.yyy)); v is a vector and add to a dot product of v and some other vector with y,y,y the right part results in a scalar, how can a vector add to a scalar gives another vector? "vec4 permute(vec4 x) {", "return mod289(((x * 34.0) + 1.0) * x);", "}", Also this, x of type vector4 is expanded 34 times should result in another vector4, how on earth can you add one to a vector4? Update: Does he mean to add one to a vector piecewise? Thanks Jack

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>