GLSL Lamp with OnlyShadow makes weird colors in object. #40078

Closed
opened 2014-05-08 00:39:10 +02:00 by Mario Mey · 14 comments

Now, I have nVidia, but I remember the same problem with an ATI.

Look at the screenshot or open the file.

Now, I have nVidia, but I remember the same problem with an ATI. Look at the screenshot or open the file.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @MarioSottile

Added subscriber: @MarioSottile
Author
![Captura_de_pantalla_de_2014-05-07_19:38:42.png](https://archive.blender.org/developer/F87687/Captura_de_pantalla_de_2014-05-07_19_38_42.png) [44-shadow-weird-colors.blend](https://archive.blender.org/developer/F87689/44-shadow-weird-colors.blend)
Author

With "Only Shadows" off.

Captura_de_pantalla_de_2014-05-07_19:38:42.png

With "Only Shadows" off. ![Captura_de_pantalla_de_2014-05-07_19:38:42.png](https://archive.blender.org/developer/F87690/Captura_de_pantalla_de_2014-05-07_19_38_42.png)
Author

Sorry, this is the screenshot with "Only Shadows" off.

Captura_de_pantalla_de_2014-05-07_19:41:48.png

Sorry, this is the screenshot with "Only Shadows" off. ![Captura_de_pantalla_de_2014-05-07_19:41:48.png](https://archive.blender.org/developer/F87692/Captura_de_pantalla_de_2014-05-07_19_41_48.png)

Added subscriber: @mont29

Added subscriber: @mont29

“Only Shadow” is a rather advanced option, not sure whether we consider it supported or not with our current GLSL code?

“Only Shadow” is a rather advanced option, not sure whether we consider it supported or not with our current GLSL code?
Sergey Sharybin self-assigned this 2014-05-19 17:01:54 +02:00

Will have a look.

Will have a look.

Added subscriber: @solarlune

Added subscriber: @solarlune

This issue was referenced by 8008d9bdfd

This issue was referenced by 8008d9bdfd5730b15727d0fb16f4417a4b8a85cc
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Closed by commit 8008d9bdfd.

Closed by commit 8008d9bdfd.
Shinsuke Irie changed title from Lamp with OnlyShadow makes weird colors in object. to GLSL Lamp with OnlyShadow makes weird colors in object. 2014-05-30 10:23:09 +02:00
Member

Added subscribers: @Sergey, @brecht, @IRIEShinsuke

Added subscribers: @Sergey, @brecht, @IRIEShinsuke
Member

BTW, I noticed the only shadow lamp seems to be not working correctly in Blender Render.
If "Only Shadow" is enabled, disabling "Specular" option takes no effect.

@Sergey @brecht, do you think it's an actual bug?

Here is a fix for the glitch:

diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index cc781c8..ebf88ef 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1466,9 +1466,11 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
                                                shr->shad[1] -= shadfac[3]*shi->g*(1.0f-lashdw[1]);
                                                shr->shad[2] -= shadfac[3]*shi->b*(1.0f-lashdw[2]);
                                                
-                                               shr->spec[0] -= shadfac[3]*shi->specr*(1.0f-lashdw[0]);
-                                               shr->spec[1] -= shadfac[3]*shi->specg*(1.0f-lashdw[1]);
-                                               shr->spec[2] -= shadfac[3]*shi->specb*(1.0f-lashdw[2]);
+                                               if (!(lar->mode & LA_NO_SPEC)) {
+                                                       shr->spec[0] -= shadfac[3]*shi->specr*(1.0f-lashdw[0]);
+                                                       shr->spec[1] -= shadfac[3]*shi->specg*(1.0f-lashdw[1]);
+                                                       shr->spec[2] -= shadfac[3]*shi->specb*(1.0f-lashdw[2]);
+                                               }
                                                
                                                return;
                                        }
BTW, I noticed the only shadow lamp seems to be not working correctly in Blender Render. If "Only Shadow" is enabled, disabling "Specular" option takes no effect. @Sergey @brecht, do you think it's an actual bug? Here is a fix for the glitch: ``` diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index cc781c8..ebf88ef 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -1466,9 +1466,11 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int shr->shad[1] -= shadfac[3]*shi->g*(1.0f-lashdw[1]); shr->shad[2] -= shadfac[3]*shi->b*(1.0f-lashdw[2]); - shr->spec[0] -= shadfac[3]*shi->specr*(1.0f-lashdw[0]); - shr->spec[1] -= shadfac[3]*shi->specg*(1.0f-lashdw[1]); - shr->spec[2] -= shadfac[3]*shi->specb*(1.0f-lashdw[2]); + if (!(lar->mode & LA_NO_SPEC)) { + shr->spec[0] -= shadfac[3]*shi->specr*(1.0f-lashdw[0]); + shr->spec[1] -= shadfac[3]*shi->specg*(1.0f-lashdw[1]); + shr->spec[2] -= shadfac[3]*shi->specb*(1.0f-lashdw[2]); + } return; } ```
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#40078
No description provided.