From 9af3b8a07e5ec51cc7838f8cbcd130262e2e095e Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 17 Jan 2008 19:01:58 +0000 Subject: Render control feature: shader-level shadowbuffer bias Lampbuffers require painful bias tweaking (to prevent aliasing or to get shadow detail). Sometimes you want this different per object, like for gras you want less shadow detail, but for the ground you want high detail. This feature allows to tweak it. The new "LBias" slider is in shader panel, bottom. Ugly! But, thats for later... --- source/blender/src/buttons_shading.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/src/buttons_shading.c') diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 2e73a6db06f..c7ba1430748 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -3714,7 +3714,7 @@ static void material_panel_shading(Material *ma) uiBlock *block; block= uiNewBlock(&curarea->uiblocks, "material_panel_shading", UI_EMBOSS, UI_HELV, curarea->win); - if(uiNewPanel(curarea, block, "Shaders", "Material", 640, 0, 318, 204)==0) return; + if(uiNewPanel(curarea, block, "Shaders", "Material", 640, 0, 318, 224)==0) return; uiSetButLock(ma->id.lib!=NULL, ERROR_LIBDATA_MESSAGE); @@ -3792,6 +3792,7 @@ static void material_panel_shading(Material *ma) uiDefButF(block, NUMSLI, B_MATPRV, "SBias ", 159,30,151,19, &(ma->sbias), 0.0, 0.25, 10, 2, "Shadow bias, to prevent terminator problems on shadow boundary"); uiDefButF(block, NUMSLI, B_MATPRV, "Amb ", 9,10,150,19, &(ma->amb), 0.0, 1.0, 0, 0, "Sets the amount of global ambient color the material receives"); uiDefButF(block, NUMSLI, B_MATPRV, "Emit ", 159,10,151,19, &(ma->emit), 0.0, 2.0, 0, 0, "Sets the amount of light the material emits"); + uiDefButF(block, NUMSLI, B_MATPRV, "LBias ", 9,-10,300,19, &(ma->lbias), 0.0, 10.0, 100, 2, "Factor to multiply shadowbuffer bias with (0 is ignore)"); uiBlockEndAlign(block); uiBlockSetCol(block, TH_BUT_SETTING1); @@ -3807,6 +3808,8 @@ static void material_panel_shading(Material *ma) uiBlockBeginAlign(block); uiDefIDPoinBut(block, test_grouppoin_but, ID_GR, B_MATPRV, "GR:", 9, 55, 150, 19, &ma->group, "Limit Lighting to Lamps in this Group"); uiDefButBitI(block, TOG, MA_GROUP_NOLAY, B_MATPRV, "Exclusive", 159,55, 85,20, &(ma->mode), 0, 0, 0, 0, "The material exclusively uses Lamps in this Group"); + + } } -- cgit v1.2.3