Jump to content

restore albedo_color while deselecting an object


photo

Recommended Posts

Hello

Scene has a lot of objects with different albedo_color - that set in material

As in mouse_pick example I set albedo_color as Red - also I need store previous value,
 

vec4 original_color = Object.getMaterialParameter("albedo_color", 0);
Object.setMaterialParameter("albedo_color", vec4(1,0,0,0), 0);//Red as selected

I found there are only one more vec4 value - emission_color, but storing albedo_color  in there changes color of object while render

so

1. is Object material has any unused vec4 value? where I can store albedo_color for free

2. or how to change selected object color, without using albedo_color?

 

creating additional array in code to store albedo_color not an option!

 

Link to comment

Hi, if you can't store your colors via code, maybe auxiliary_color can help you to store your color inside the material. Be carefull as it is used in some post shaders.

Hope this helps you, regards

Edited by javier.serrano
Link to comment
×
×
  • Create New...