Tag Info

New answers tagged

1

Unity has three kinds of lights that work in real-time: Directional, point, and spot. Point lights just sit somewhere and emit light in all directions, which sounds a lot like the sun, but you would have to put the light so far away from everything and make it so strong that it may be unreasonable. Spot lights are the same, except they emit light in a cone ...


0

I dont think that would happen, i havent use it how ever, but if u think about it, you are multiplying the light contribution with the object color as the equation you provide finalColor = ambient for light in lights: finalColor += light.specular + light.diffuse finalColor *= objectColor; and even in real live if you have a very shiny object like car ...


2

The problem isn't particularly with the additive math. Contributions from multiple light sources is resolved by addition. We can clearly see that in the rendering equation. As we see in the equation light contributions is integrated over the unit hemisphere containing all possible values for all light directions(Wi). In real time computer graphics we only ...


8

tl;dr func 1 1 - 2 * |(x mod 2) - 1| Or in your specific case: 1 - 2 * |((time % entireDay) - halfDay) / halfDay| You can even use a sinus wave instead (much more pretty). sin(x - pi/2) Sin Wave Or in your specific case: sin (- pi / 2 + 2 * pi * time / entireDay); Long tedious explaination in fine detail: If in military time: 00:00 ...


2

I know this is old, but I finally discovered the solution. In my game, I am using g.translate(x,y); but I was using a float for the x and y values. So I did this: g.translate(Math.round(transX),Math.round(transY); Now there are no more vertical lines! Hopefully this helps anyone else with this problem.


0

MooseBoys is right when he says integrate the hemisphere about the normal And to some extend you are also right when you say that a low mipmap is doing that, but not 100% mathematically correct. What you need to have physically speaking, is a convolution with a cosine lobe in linear space. What you get with the mipmap sampling, is a convolution with ...


2

Direct3D 10.x and Direct3D 11.x do not support the 'legacy fixed-function' pipeline that your Direct3D 9 code is using. Preparing to move to Direct3D 10 or 11 means eliminating all fixed-function usage and moving to programmable shaders. It is also apparent from your code snippet that you are not using the state objects correctly. In Direct3D 9, you set ...


1

You're right, there is no lighting in D3D10 unless you implement it yourself in shaders.



Top 50 recent answers are included