Vertex Colors not working in the BGE (for custom GLSL shaders) when multitexture and no material #34505

Closed
opened 2013-03-03 11:46:16 +01:00 by Dalai Felinto · 10 comments

%%%(before moving this to the game engine tracker, I could use some help with testing in other OSs/configs - also it may be something in Blender, not necessarily the BGE)

See vertexcolor249.blend (it can run in 2.49 or 2.66).
In the game (P) you should see the vertex colors of the cube. Instead gl_Color is returning 1.0, 1.0, 1.0 always.

I'm 95% sure that this should work in windows at least, so I don't know why OSX is the one not supporting this.
But if someone can please help confirming or refuting this bug in a different OS/gfx it would be of great help.
(tests in 2.49 and 2.66 if possible).

Thanks, my OSX is 10.8.2, and my graphic card is AMD Radeon HD 6750M
(note I tried in my windows vmware here but it didn't work either. I don't trust vmware for those tests though)

UPDATE: the original test file was bad, updated a new one%%%

%%%(before moving this to the game engine tracker, I could use some help with testing in other OSs/configs - also it may be something in Blender, not necessarily the BGE) See vertexcolor249.blend (it can run in 2.49 or 2.66). In the game (P) you should see the vertex colors of the cube. Instead gl_Color is returning 1.0, 1.0, 1.0 always. I'm 95% sure that this should work in windows at least, so I don't know why OSX is the one not supporting this. But if someone can please help confirming or refuting this bug in a different OS/gfx it would be of great help. (tests in 2.49 and 2.66 if possible). Thanks, my OSX is 10.8.2, and my graphic card is AMD Radeon HD 6750M (note I tried in my windows vmware here but it didn't work either. I don't trust vmware for those tests though) UPDATE: the original test file was bad, updated a new one%%%
Author
Owner

Changed status to: 'Open'

Changed status to: 'Open'

%%%Windows 7, official 2.66: It shows white only after pressing P. (Geforce 540M and Intel HD 3000) %%%

%%%Windows 7, official 2.66: It shows white only after pressing P. (Geforce 540M and Intel HD 3000) %%%
Author
Owner

%%%Moved from Blender 2.6 Bug Tracker to Game Engine%%%

%%%Moved from Blender 2.6 Bug Tracker to Game Engine%%%
Author
Owner

%%%apparently material mode needs to be on GLSL mode for this to work. I have a vague memory of this working in MultiTexture, but I may be wrong.
closing the report%%%

%%%apparently material mode needs to be on GLSL mode for this to work. I have a vague memory of this working in MultiTexture, but I may be wrong. closing the report%%%
Author
Owner

%%%so, there are two workarounds:

  1. to use GLSL
  2. to use a material with the "Vertex Color Paint" option.

The bug was introduced in 2.58. But to make matters worse, it's only visible in 2.58a (2.58 shows 0,0,0 as vertex colors).
Attached a new test file (saved in 2.57) and in-game screenshots of 2.57, 2.58 and 2.58a.%%%

%%%so, there are two workarounds: 1) to use GLSL 2) to use a material with the "Vertex Color Paint" option. The bug was introduced in 2.58. But to make matters worse, it's only visible in 2.58a (2.58 shows 0,0,0 as vertex colors). Attached a new test file (saved in 2.57) and in-game screenshots of 2.57, 2.58 and 2.58a.%%%
Author
Owner

%%%this bug was introduced in rev. 36723
(but rev. 36543 makes all cubes black, which was reverted only on rev. 37773 - so for tests this review has to be manually reverted)%%%

%%%this bug was introduced in rev. 36723 (but rev. 36543 makes all cubes black, which was reverted only on rev. 37773 - so for tests this review has to be manually reverted)%%%
Author
Owner

%%%Attached are three options for the fix.
@Campbell, any suggestion?%%%

%%%Attached are three options for the fix. @Campbell, any suggestion?%%%

%%%In order to keep the codebase cleaner, I'd prefer to avoid too many if defmaterial checks, which makes me leaner closer to 1 and 2. It might be better if we don't modify defmaterials ourselves, which makes me prefer 1 over 2, but this is more Campbell's territory (modifying Blender defaults).%%%

%%%In order to keep the codebase cleaner, I'd prefer to avoid too many if defmaterial checks, which makes me leaner closer to 1 and 2. It might be better if we don't modify defmaterials ourselves, which makes me prefer 1 over 2, but this is more Campbell's territory (modifying Blender defaults).%%%
Author
Owner

%%%bug fixed on rev. r55487 (after code cleanup by Campbell)
Thanks for the report.

  • you're welcome%%%
%%%bug fixed on rev. r55487 (after code cleanup by Campbell) Thanks for the report. - you're welcome%%%
Author
Owner

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
3 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#34505
No description provided.