From 425f2956043fb9da71bfa34086d923cda4b0e9c2 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 17 Apr 2005 17:43:07 +0000 Subject: Patch submitted by Jorge Bernal (lordloki) and Jonathan Merritt. This will add Minneart diffuse and WardIso specular to our shader menu. Minneart gives nice control over darkness/brightness areas, the wardIso over 'plastic' style sharp or fuzzy specular. Webpage is being made with nice samples. Will be in release log. Jorge: one change is in the do_versions, you inserted it on wrong location. --- source/blender/blenloader/intern/readfile.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 0d04fff7343..f2db3d25621 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4223,6 +4223,8 @@ static void do_versions(Main *main) ma->param[1]= 0.1; ma->param[2]= 0.1; ma->param[3]= 0.05; + ma->rms=0.1; + ma->darkness=1.0; } // patch for old wrong max view2d settings, allows zooming out more for (sc= main->screen.first; sc; sc= sc->id.next) { @@ -4636,6 +4638,7 @@ static void do_versions(Main *main) Object *ob; Scene *sce= main->scene.first; Camera *cam= main->camera.first; + Material *ma; bScreen *sc; while(sce) { @@ -4662,6 +4665,12 @@ static void do_versions(Main *main) } } } + // init new shader vars + for (ma= main->mat.first; ma; ma= ma->id.next) { + ma->rms=0.1; + ma->darkness=1.0; + } + /* temporal copy */ for(ob= main->object.first; ob; ob= ob->id.next) { if(ob->softflag && ob->soft==NULL) { -- cgit v1.2.3