0.0
? smoothstep(0.0, 1.0, -1.0)
smoothstep(0.0, 1.0, -0.5)
smoothstep(0.0, 1.0, 0.0)
smoothstep(0.0, 1.0, 0.5)
smoothstep(0.0, 1.0, 1.0)
1.0
? smoothstep(0.0, 1.0, 1.0)
smoothstep(0.0, 1.0, 0.5)
smoothstep(0.0, 1.0, 0.0)
smoothstep(0.0, 1.0, -0.5)
smoothstep(0.0, 1.0, -1.0)
t = 0, 1, 2
, which ones will be aliases of (i.e. have the same sampled values as) Math.sin(t * Math.PI)
? Math.sin(2 * t * Math.PI)
Math.sin(-t * Math.PI)
0 * t
1 * t
Math.cos(t * Math.PI)
v
at the current pixel is 1.0
and the value of v
at the pixel on the left is -1.0
, on the right is 3.0
, above the pixel is -2.0
and below the pixel is 4.0
, which of the following are possible values of dFdx(v)
? Assume the pixel to the left of the current pixel has a smaller x
value. 2.0
-2.0
3.0
-1.0
0.0
v
at the current pixel is 1.0
and the value of v
at the pixel on the left is -1.0
, on the right is 3.0
, above the pixel is -2.0
and below the pixel is 4.0
, which of the following are possible values of dFdy(v)
? Assume the pixel above the current pixel has a smaller y
value. 3.0
-3.0
-2.0
4.0
0.0
dFdx(v)
is 2.0
and dFdy(v)
is -2.0
, what is fwidth(v)
? 4.0
0.0
2.0
sqrt(8.0)
1.0
lp = vec3(1.0, 1.0, 1.0)
in the scene coordinates to the camera coordinates in the vertex shaders (so that the light does not move with the camera)? vec3(viewMatrix * vec4(lp, 1.0))
, there is no need to multiply modelMatrix
since the transformation for the vertices does not apply to the light position. vec3(viewMatrix * vec4(lp, 1.0))
viewMatrix * lp
normalMatrix * lp
vec3(projectionMatrix * viewMatrix * vec4(lp, 1.0))
projectionMatrix * viewMatrix * lp
1.0
in the shader? step(t, x)
means x < t ? 0.0 : 1.0
. step(0.0, 0.5)
step(0.25, 0.5)
step(0.5, 0.5)
step(0.75, 0.5)
step(1.0, 0.5)
Last Updated: November 30, 2024 at 4:35 AM