Jump to content

Is Set Color no longer scaler?


Thirsty Panther
 Share

Recommended Posts

The only thing that still uses the 0-255 scale is the color picker window (scripted color property)- but to set the color picker via code you would use the 0-1 scale. Also the color picker now returns a 0-1 scale. All other color features use 0-1 scale as well (SetColor(), shaders,etc...). Anything over 1 is just increasing the saturation/intensity which you will not notice a difference over 2 on models and for 2D items no difference over 1. As for Aggror's script, I cannot say if he is converting the 0-255 scale to the 0-1.

 

The four cardboard boxes show how it works. First box from the left shows the texture. Second box from the left shows the results of SetColor(1,0,0,1) mixed with the texture. Third box from the left shows the saturation from using SetColor(2,0,0,1). And the fourth box shows that using a SetColor(255,0,0,255) looks the same as the saturated third box. Note though that a script's color property will give weird results in the color picker window if you use anything other than a 0-1 scale to set the property.

post-14-0-64163800-1434867379_thumb.jpg

 

 

See this bug report for more details: http://www.leadwerks.com/werkspace/topic/12241-script-color-property-returns-unexpected-results/#entry88728

  • Upvote 1

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...