Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2003-12-10 23:41:53 +0300
committerTon Roosendaal <ton@blender.org>2003-12-10 23:41:53 +0300
commita18cc02374e8993824cfeb12b9e67b5b067317d9 (patch)
tree92b674659affe20fcdbf521ddc1a7269d4cc696b /source/blender/makesdna
parentcad30134cb9093650488a37803361fcbf1f1db2f (diff)
- 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.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h4
-rw-r--r--source/blender/makesdna/DNA_material_types.h5
-rw-r--r--source/blender/makesdna/DNA_scene_types.h17
3 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index 90529474d67..1a73c5fb9a2 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -56,6 +56,9 @@ typedef struct Lamp {
float clipsta, clipend, shadspotsize;
float bias, soft;
+ short ray_samp, pad;
+ float ray_soft;
+
/* texact is for buttons */
short texact, shadhalostep;
@@ -88,6 +91,7 @@ typedef struct Lamp {
#define LA_DEEP_SHADOW 1024
#define LA_NO_DIFF 2048
#define LA_NO_SPEC 4096
+#define LA_SHAD_RAY 8192
/* mapto */
#define LAMAP_COL 1
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index e7639d97d5a..505dd319046 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -54,9 +54,10 @@ typedef struct Material {
float mirr, mirg, mirb;
float ambr, ambb, ambg;
- float amb, emit, ang, spectra;
+ float amb, emit, ang, spectra, ray_mirror;
float alpha, ref, spec, zoffs, add;
float kfac; /* for transparent solids */
+ short ray_depth, pad1;
short har;
char seed1, seed2;
@@ -82,7 +83,7 @@ typedef struct Material {
/* dynamic properties */
float friction, fh, reflect;
float fhdist, xyfrict;
- short dynamode, pad;
+ short dynamode, pad2;
ScriptLink scriptlink;
} Material;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index ca482800917..48c448187f6 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -174,12 +174,13 @@ typedef struct RenderData {
* 9: borders
* 10: panorama
* 11: crop
- * 12: save SGI movies with Cosmo hardware (????)
- * 13: odd field first rendering
- * 14: motion blur
- * 15: use unified renderer for this pic!
+ * 12: save SGI movies with Cosmo hardware
+ * 13: odd field first rendering
+ * 14: motion blur
+ * 15: use unified renderer for this pic
+ * 16. enable raytracing
*/
- short mode;
+ int mode;
/**
* What to do with the sky/background. Picks sky/premul/key
@@ -199,7 +200,7 @@ typedef struct RenderData {
/** For unified renderer: reduce intensity on boundaries with
* identical materials with this number.*/
- short same_mat_redux, pad_3[3];
+ short same_mat_redux, pad_3[2];
/**
* The gamma for the normal rendering. Used when doing
@@ -263,7 +264,7 @@ typedef struct Scene {
#define R_FRONTBUF 4
#define R_FRONTBUFANIM 8
-/* mode */
+/* mode (int now) */
#define R_OSA 0x0001
#define R_SHADOW 0x0002
#define R_GAMMA 0x0004
@@ -277,10 +278,10 @@ typedef struct Scene {
#define R_PANORAMA 0x0400
#define R_MOVIECROP 0x0800
#define R_COSMO 0x1000
-/* these difines were different between IrisGL and OpenGL!!! */
#define R_ODDFIELD 0x2000
#define R_MBLUR 0x4000
#define R_UNIFIED 0x8000
+#define R_RAYTRACE 0x10000
/* scemode */
#define R_DOSEQ 0x0001