My first task as programmer will be to add lovely flares and glows to lightsources to greate a polished next-gen look. I started with the lensflare sample provided by XNA. messing around with it I soon had a couple of giant and colored lenflares lighting up the skies. Next step was to convert the sample into something that didnt work with a distant sun, but with local lights.
This wasnt to hard, but did create a problem I did not see earlier and am now currently trying to find a way around. The code checks if the light is behind terrain yes or no. If it isnt, the flare is drawn, if it is, it isnt drawn. This creates a problem when the local light has eg a roof above it. The code detects geometry around the light and descides not to draw the flare, which is obviously wrong.
Obvious solutions (like raytracing) will not create the pretty fade in fade out effects that the code has now though, so Im still browing around for a nice combination of the two.
Geen opmerkingen:
Een reactie posten