Tag Info

New answers tagged

2

Unfortunately, the only way to (theoretically) get stuff to layer together into a full-alpha pixel is to have a completely opaque layer. Reasoning: The alpha channel is a multiplier for applying the other colour channels. Painting a region with opacity opacity,n times, gives you 1 - opacity^n final alpha. Here's a demo: The leftmost is black at opacity ...


1

The transform method of Vector class is wrong. If you want to perform a transformation of the vector that is equivalent to multiplying a vector by a transform matrix, you should modify your code as follows: void Vector2::transform(double a, double b, double c, double d) { double newX = a*x + b*y; y = c*x + d*y; x = newX; }


-1

Z-buffer. It's how webgl handles it.


0

Other than being more performance efficient, I find it simply easier. It requires a little extra work to make sure your images are always within their bounds when creating the art, but it's a lot easier being able to see all the images you're dealing with at the moment. It's also easier to code, in my opinion. I simply have an array of objects like: sheet ...


1

I'm not very good with English, let's hope that the variable names are clear. float3 half_vector = normalize( eye_dir + light_dir ); float n_dot_l = saturate( dot( normal, light_dir ) ); float n_dot_h = saturate(dot( normal, half_vector ); float h_dot_l = saturate(dot( half_vector, light_dir )); // Amount of reflected energy based on angle // usually is [f0 ...



Top 50 recent answers are included