- Xmas special: shiny mirroring bells & whistles!
This is a revision of the old NeoGeo raytracer, dusted off, improved quite a lot, and nicely integrated in the rest of rendering pipeline. Enable it with F10-"Ray", and set either a 'ray-shadow' lamp or give the Material a "RayMirror" value. It has been added for 2 reasons: - get feedback on validity... I need artists to play around with it if it's actually useful. It still *is* raytracing, meaning complex scenes will easily become slow. - for educational purposes. All raytracing happens in ray.c, which can be quite easily adjusted for other effects. When too many disasters pop up with this, I'll make it a compile #ifdef. But so far, it seems to do a decent job. Demo files: http://www.blender.org/docs/ray_test.tgz An article (tech) about how it works, and about the new octree invention will be posted soon. :) Note: it doesn't work with unified render yet.
This commit is contained in:
@@ -577,6 +577,15 @@ void init_render_material(Material *ma)
|
||||
}
|
||||
if(needuv) ma->texco |= NEED_UV;
|
||||
|
||||
if(R.r.mode & R_RAYTRACE) {
|
||||
if(ma->ray_mirror!=0.0) {
|
||||
ma->texco |= NEED_UV|TEXCO_REFL;
|
||||
if(R.osa) ma->texco |= TEXCO_OSA;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ma->ambr= ma->amb*R.wrld.ambr;
|
||||
ma->ambg= ma->amb*R.wrld.ambg;
|
||||
ma->ambb= ma->amb*R.wrld.ambb;
|
||||
|
||||
Reference in New Issue
Block a user