Codebase APlha - Shader notes - class 1

https://codeshare.io https://www.shadertoy.com/view/XdlSD4


https://www.shadertoy.com/view/ldyGWm


https://www.shadertoy.com/view/3sXSD2


https://www.shadertoy.com/view/lttBzN



KodeLife : instant feedback shaders: no objects, no memory allocation, no
recursion Linear Algebra : vector [point, direction] float, vec2 , vec3, vec4
swizzle : uv.x, uv.xy, , uv.xyz , uv.yx length: distance from origin float l =
length(uv); dot product of 2 vectors 1. Shows how similar they are for
normalized vectors : https://twitter.com/freyaholmer/status/1200807790580768768
If dot product = 0 , the 2 vectors are perpendicular to each other. =1, they are
same , =-1 opposite direction 2. dot(a,b) = length(a) * length(b) cos[angle] OR
angle = acos (dot(a,b)/length(a) * length(b)) 3. (a,b) . (x,y) = ax + by dot
product of 2 vectors is a scalar float a = dot(xy,uv); cross product of two 3D
vectors gives a vector that is perpendicular to both the vectors. [right hand
rule symbolism] a d bf-ec b X e = af-dc c f ae-bd 1. move center to origin from
bottom left vec2 uv = -1. + 2. * inData.v_texcoord 2. normalize width and height
uv.x *= resolution.x / resolution.y 3. distance field [d] : how far from the
object [2D] float l = length(uv); float r = 0.5; float d = l - r; //radius
if(d

Comments

Popular posts from this blog

How to get started with Vue in under a minute?

aigiri nandini - Brodha V you rock