Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
corona_shade_context [2015/02/10 14:39]
keymaster created
corona_shade_context [2020/04/29 08:55] (current)
keymaster [Using Corona Shade Context]
Line 4: Line 4:
 Corona uses 2 shade contexts - one for hit into the scene background (environment), and other for all geometry hits. Their Class_IDs are: Corona uses 2 shade contexts - one for hit into the scene background (environment), and other for all geometry hits. Their Class_IDs are:
   * Scene geometry hit: a=0x6E816801, b=0xAD8731C5   * Scene geometry hit: a=0x6E816801, b=0xAD8731C5
-  * Background (environment maps): a=0x6E816801, b=0xAD8731C5+  * Background (environment maps): a=0x6E816801, b=0xAD8731C6
  
 ===== Using Corona Shade Context ===== ===== Using Corona Shade Context =====
-Corona shade contexts try to conform to 3ds Max API specifications as much as possible, but sometimes that is not possible for multiple reasons (confusing or ambiguous API documentation, differences between physically based renderer and old rasterizer architecture the API was created for). Notable methods that do not work are:+Corona shade contexts try to conform to 3ds Max API specifications as much as possible, but sometimes that is not possible for multiple reasons (confusing or ambiguous API documentation, design differences between physically based renderer and the old rasterizer architecture the API was created for, ...). Notable methods that do not work are:
   * ''Light()''   * ''Light()''
   * ''GetEvalObject()''   * ''GetEvalObject()''
   * ''NodeID()''   * ''NodeID()''
  
-You can get additional functionality with the ''Execute'' method. When passing 0x0x389A7625 as ''cmd'' argument, scene geometry hit ShadeContext will return an unique ID of the currently hit object instance. This can be used for example to randomize color between different instances (build 2015-02-10 and newer)+You can get additional functionality with the ''Execute'' method. When passing ''constexpr int CORONA_GET_INSTANCE_ID = 0x389A7625''as ''cmd'' argument, scene geometry hit ShadeContext will return unique ID of the currently hit object instance (of type uint64_t). This can be used for example to randomize color between different instances.

Log In