Only in .: att.pat diff -cr /root/source/frame.h ./frame.h *** /root/source/frame.h Sat May 1 23:01:17 1999 --- ./frame.h Thu Sep 9 10:18:58 1999 *************** *** 21,26 **** --- 21,27 ---- * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins. * * Modified by Andreas Dilger to add PNG file format support 05/09/95 + * Modified by Edward Coffey to add coloured attenuation on 09/09/99 * *****************************************************************************/ *************** *** 932,937 **** --- 933,939 ---- SNGL IOR; SNGL Caustics, Old_Refract; SNGL Fade_Distance, Fade_Power; + COLOUR Fade_Colour; IMEDIA *IMedia; }; diff -cr /root/source/interior.c ./interior.c *** /root/source/interior.c Sat May 1 23:01:18 1999 --- ./interior.c Thu Sep 9 10:20:06 1999 *************** *** 119,124 **** --- 119,125 ---- * CHANGES * * Dec 1994 : Creation. + * Sep 1999 : Fade_Colour added - Edward Coffey * ******************************************************************************/ *************** *** 137,142 **** --- 138,144 ---- New->Fade_Distance = 0.0; New->Fade_Power = 0.0; + Make_Colour(New->Fade_Colour, 0.0, 0.0, 0.0); New->IMedia = NULL; diff -cr /root/source/lighting.c ./lighting.c *** /root/source/lighting.c Sat May 1 23:01:19 1999 --- ./lighting.c Thu Sep 9 10:27:15 1999 *************** *** 2329,2334 **** --- 2329,2337 ---- * * Oct 1996 : Replaced halo code by participating media code. [DB] * + * Sep 1999 : Expanded distance based attenuation to include colour. + * Edward Coffey + * ******************************************************************************/ static void compute_lighted_texture(COLOUR ResCol, TEXTURE *Texture, VECTOR IPoint, VECTOR Raw_Normal, RAY *Ray, DBL Weight, INTERSECTION *Intersection) *************** *** 2341,2347 **** DBL Normal_Direction, New_Weight, TempWeight; DBL Att, Trans, Max_Radiosity_Contribution; VECTOR LayNormal, TopNormal; ! COLOUR LayCol, RflCol, RfrCol, FilCol; COLOUR TmpCol, AmbCol, Tmp; INTERIOR *Interior; IMEDIA **TmpMedia, **MediaList; --- 2344,2350 ---- DBL Normal_Direction, New_Weight, TempWeight; DBL Att, Trans, Max_Radiosity_Contribution; VECTOR LayNormal, TopNormal; ! COLOUR AttCol, LayCol, RflCol, RfrCol, FilCol; COLOUR TmpCol, AmbCol, Tmp; INTERIOR *Interior; IMEDIA **TmpMedia, **MediaList; *************** *** 2571,2583 **** /* Get distance based attenuation. */ ! Att = Interior->Old_Refract; if ((Interior != NULL) && Interior_In_Ray_Container(Ray, Interior) >= 0) { if (fabs(Interior->Fade_Distance) > EPSILON) { ! Att /= (1.0 + pow(Intersection->Depth / Interior->Fade_Distance, Interior->Fade_Power)); } } --- 2574,2589 ---- /* Get distance based attenuation. */ ! AttCol[0] = AttCol[1] = AttCol[2] = Interior->Old_Refract; if ((Interior != NULL) && Interior_In_Ray_Container(Ray, Interior) >= 0) { if (fabs(Interior->Fade_Distance) > EPSILON) { ! Att = 1.0 + pow(Intersection->Depth / Interior->Fade_Distance, Interior->Fade_Power); ! AttCol[0] *= Interior->Fade_Colour[0] + (1.0 - Interior->Fade_Colour[0]) / Att; ! AttCol[1] *= Interior->Fade_Colour[1] + (1.0 - Interior->Fade_Colour[1]) / Att; ! AttCol[2] *= Interior->Fade_Colour[2] + (1.0 - Interior->Fade_Colour[2]) / Att; } } *************** *** 2585,2613 **** if (TIR_occured) { ! ResCol[0] += Att * RfrCol[0]; ! ResCol[1] += Att * RfrCol[1]; ! ResCol[2] += Att * RfrCol[2]; } else { if (one_colour_found) { ! ResCol[0] += Att * RfrCol[0] * (FilCol[0] * FilCol[FILTER] + FilCol[TRANSM]); ! ResCol[1] += Att * RfrCol[1] * (FilCol[1] * FilCol[FILTER] + FilCol[TRANSM]); ! ResCol[2] += Att * RfrCol[2] * (FilCol[2] * FilCol[FILTER] + FilCol[TRANSM]); } else { ! ResCol[0] += Att * RfrCol[0]; ! ResCol[1] += Att * RfrCol[1]; ! ResCol[2] += Att * RfrCol[2]; } } /* We need to know the transmittance value for the alpha channel. [DB] */ ! ResCol[TRANSM] = Att * FilCol[TRANSM]; } /* --- 2591,2619 ---- if (TIR_occured) { ! ResCol[0] += AttCol[0] * RfrCol[0]; ! ResCol[1] += AttCol[1] * RfrCol[1]; ! ResCol[2] += AttCol[2] * RfrCol[2]; } else { if (one_colour_found) { ! ResCol[0] += AttCol[0] * RfrCol[0] * (FilCol[0] * FilCol[FILTER] + FilCol[TRANSM]); ! ResCol[1] += AttCol[1] * RfrCol[1] * (FilCol[1] * FilCol[FILTER] + FilCol[TRANSM]); ! ResCol[2] += AttCol[2] * RfrCol[2] * (FilCol[2] * FilCol[FILTER] + FilCol[TRANSM]); } else { ! ResCol[0] += AttCol[0] * RfrCol[0]; ! ResCol[1] += AttCol[1] * RfrCol[1]; ! ResCol[2] += AttCol[2] * RfrCol[2]; } } /* We need to know the transmittance value for the alpha channel. [DB] */ ! ResCol[TRANSM] = (0.30*AttCol[0] + 0.59*AttCol[1] + 0.11*AttCol[2]) * FilCol[TRANSM]; } /* *************** *** 2744,2752 **** static void compute_shadow_texture (COLOUR Filter_Colour, TEXTURE *Texture, VECTOR IPoint, VECTOR Raw_Normal, RAY *Ray, INTERSECTION *Ray_Intersection) { int i, inside_hollow_object, colour_found, one_colour_found; ! DBL Caustics, dot, k, Refraction; VECTOR Layer_Normal; ! COLOUR Layer_Pigment_Colour; IMEDIA **Media_List, **Tmp; TEXTURE *Layer; INTERIOR *Interior = Ray_Intersection->Object->Interior; --- 2750,2758 ---- static void compute_shadow_texture (COLOUR Filter_Colour, TEXTURE *Texture, VECTOR IPoint, VECTOR Raw_Normal, RAY *Ray, INTERSECTION *Ray_Intersection) { int i, inside_hollow_object, colour_found, one_colour_found; ! DBL Caustics, dot, k; VECTOR Layer_Normal; ! COLOUR Refraction, Layer_Pigment_Colour; IMEDIA **Media_List, **Tmp; TEXTURE *Layer; INTERIOR *Interior = Ray_Intersection->Object->Interior; *************** *** 2798,2825 **** if (Interior != NULL) { ! Refraction = 1.0; if (Interior_In_Ray_Container(Ray, Interior) >= 0) { if ((Interior->Fade_Power > 0.0) && (fabs(Interior->Fade_Distance) > EPSILON)) { ! Refraction /= 1.0 + pow(Ray_Intersection->Depth / Interior->Fade_Distance, Interior->Fade_Power); } } } else { ! Refraction = 0.0; } /* Get distance based attenuation. */ ! Filter_Colour[RED] *= Refraction; ! Filter_Colour[GREEN] *= Refraction; ! Filter_Colour[BLUE] *= Refraction; ! Filter_Colour[FILTER] *= Refraction; ! Filter_Colour[TRANSM] *= Refraction; /* * If no valid color was found we set the filtering channel --- 2804,2834 ---- if (Interior != NULL) { ! Make_Colour(Refraction, 1.0, 1.0, 1.0); if (Interior_In_Ray_Container(Ray, Interior) >= 0) { if ((Interior->Fade_Power > 0.0) && (fabs(Interior->Fade_Distance) > EPSILON)) { ! k = 1.0 + pow(Ray_Intersection->Depth / Interior->Fade_Distance, Interior->Fade_Power); ! Refraction[0] *= Interior->Fade_Colour[0] + (1 - Interior->Fade_Colour[0]) / k; ! Refraction[1] *= Interior->Fade_Colour[1] + (1 - Interior->Fade_Colour[1]) / k; ! Refraction[2] *= Interior->Fade_Colour[2] + (1 - Interior->Fade_Colour[2]) / k; } } } else { ! Make_Colour(Refraction, 0.0, 0.0, 0.0); } /* Get distance based attenuation. */ ! Filter_Colour[RED] *= Refraction[0]; ! Filter_Colour[GREEN] *= Refraction[1]; ! Filter_Colour[BLUE] *= Refraction[2]; ! /* Filter_Colour[FILTER] *= Refraction[3]; ! Filter_Colour[TRANSM] *= Refraction[4]; */ /* * If no valid color was found we set the filtering channel diff -cr /root/source/optout.h ./optout.h *** /root/source/optout.h Sat Jun 19 11:13:53 1999 --- ./optout.h Wed Aug 25 15:54:37 1999 *************** *** 36,42 **** #define POV_RAY_VERSION "3.1g" #define DISTRIBUTION_MESSAGE_1 "This is an unofficial version compiled by:" ! #define DISTRIBUTION_MESSAGE_2 "FILL IN NAME HERE........................." #define DISTRIBUTION_MESSAGE_3 "The POV-Ray Team(tm) is not responsible for supporting this version." /* Number of help pages (numbered 0 to MAX_HELP_PAGE). */ --- 36,42 ---- #define POV_RAY_VERSION "3.1g" #define DISTRIBUTION_MESSAGE_1 "This is an unofficial version compiled by:" ! #define DISTRIBUTION_MESSAGE_2 "Edward Coffey............................." #define DISTRIBUTION_MESSAGE_3 "The POV-Ray Team(tm) is not responsible for supporting this version." /* Number of help pages (numbered 0 to MAX_HELP_PAGE). */ diff -cr /root/source/parse.h ./parse.h *** /root/source/parse.h Sat May 1 23:01:22 1999 --- ./parse.h Thu Sep 9 10:21:57 1999 *************** *** 20,25 **** --- 20,28 ---- * DKBTrace was originally written by David K. Buck. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins. * + * Modified: + * Sep 1999 - FADE_COLOUR_TOKEN added - Edward Coffey + * *****************************************************************************/ #ifndef PARSE_H *************** *** 386,391 **** --- 389,395 ---- SKYSPHERE_ID_TOKEN, FADE_POWER_TOKEN, FADE_DISTANCE_TOKEN, + FADE_COLOUR_TOKEN, TURB_DEPTH_TOKEN, PPM_TOKEN, PGM_TOKEN, diff -cr /root/source/parstxtr.c ./parstxtr.c *** /root/source/parstxtr.c Sat May 1 23:01:23 1999 --- ./parstxtr.c Thu Sep 9 10:22:47 1999 *************** *** 2320,2325 **** --- 2320,2326 ---- * CHANGES * * Jan 1997 : Creation. + * Sep 1999 : Fade_Colour added - Edward Coffey * ******************************************************************************/ *************** *** 2364,2369 **** --- 2365,2374 ---- CASE (FADE_POWER_TOKEN) Interior->Fade_Power = Parse_Float(); + END_CASE + + CASE (FADE_COLOUR_TOKEN) + Parse_Colour(Interior->Fade_Colour); END_CASE CASE (MEDIA_TOKEN) diff -cr /root/source/tokenize.c ./tokenize.c *** /root/source/tokenize.c Sat May 1 23:01:30 1999 --- ./tokenize.c Thu Sep 9 10:24:50 1999 *************** *** 27,32 **** --- 27,33 ---- * * Modifications by Hans-Deltev Fink, January 1999, used with permission * Modifications by Thomas Willhalm, March 1999, used with permission + * Modified by Edward Coffey, September 1999 - fade_colour added * *****************************************************************************/ *************** *** 269,274 **** --- 270,276 ---- {EXTINCTION_TOKEN, "extinction"}, {FADE_DISTANCE_TOKEN, "fade_distance"}, {FADE_POWER_TOKEN, "fade_power"}, + {FADE_COLOUR_TOKEN, "fade_colour"}, {FALLOFF_ANGLE_TOKEN, "falloff_angle"}, {FALLOFF_TOKEN, "falloff"}, {FALSE_TOKEN, "false"}, Binary files /root/source/unix/express.o and ./unix/express.o differ Binary files /root/source/unix/interior.o and ./unix/interior.o differ Binary files /root/source/unix/lighting.o and ./unix/lighting.o differ Binary files /root/source/unix/optout.o and ./unix/optout.o differ Binary files /root/source/unix/parse.o and ./unix/parse.o differ Binary files /root/source/unix/parstxtr.o and ./unix/parstxtr.o differ Binary files /root/source/unix/tokenize.o and ./unix/tokenize.o differ Binary files /root/source/unix/x-povray and ./unix/x-povray differ