Add texture attribute to lights.
PiperOrigin-RevId: 763739805 Change-Id: I333ed2ac68f30f79f688ca01d7b5fd6bf2d836c9
This commit is contained in:
committed by
Copybara-Service
parent
441ca838a1
commit
568620dd2f
@@ -2961,6 +2961,11 @@ Attributes may be applied or ignored depending on the lighting model being used.
|
||||
The color of the light. For the Phong (default) lighting model, this defines the diffuse color of
|
||||
the light.
|
||||
|
||||
.. _body-light-texture:
|
||||
|
||||
:at:`texture`: :at-val:`string, optional`
|
||||
The texture to use for image-based lighting. This is unused by the default Phong lighting model.
|
||||
|
||||
.. _body-light-intensity:
|
||||
|
||||
:at:`intensity`: :at-val:`real, "1000.0"`
|
||||
|
||||
+1
-1
@@ -321,7 +321,7 @@
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`cutoff<body-light-cutoff>` | :ref:`exponent<body-light-exponent>` | :ref:`ambient<body-light-ambient>` | :ref:`diffuse<body-light-diffuse>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
| | | | :ref:`specular<body-light-specular>` | :ref:`mode<body-light-mode>` | :ref:`target<body-light-target>` | | |
|
||||
| | | | :ref:`specular<body-light-specular>` | :ref:`mode<body-light-mode>` | :ref:`target<body-light-target>` | :ref:`texture<body-light-texture>` | |
|
||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |_| body |br| |_| |L| | | .. table:: |
|
||||
|
||||
@@ -1186,6 +1186,7 @@ struct mjModel_ {
|
||||
int* light_bodyid; // id of light's body (nlight x 1)
|
||||
int* light_targetbodyid; // id of targeted body; -1: none (nlight x 1)
|
||||
int* light_type; // spot, directional, etc. (mjtLightType) (nlight x 1)
|
||||
int* light_texid; // texture id for image lights (nlight x 1)
|
||||
mjtByte* light_castshadow; // does light cast shadows (nlight x 1)
|
||||
float* light_bulbradius; // light radius for soft shadows (nlight x 1)
|
||||
float* light_intensity; // intensity, in candela (nlight x 1)
|
||||
@@ -2043,6 +2044,7 @@ typedef struct mjsLight_ { // light specification
|
||||
// intrinsics
|
||||
mjtByte active; // is light active
|
||||
mjtLightType type; // type of light
|
||||
mjString* texture; // texture name for image lights
|
||||
mjtByte castshadow; // does light cast shadows
|
||||
float bulbradius; // bulb radius, for soft shadows
|
||||
float intensity; // intensity, in candelas
|
||||
@@ -2847,6 +2849,7 @@ struct mjvLight_ { // OpenGL light
|
||||
float pos[3]; // position rel. to body frame
|
||||
float dir[3]; // direction rel. to body frame
|
||||
int type; // type (mjtLightType)
|
||||
int texid; // texture id for image lights
|
||||
float attenuation[3]; // OpenGL attenuation (quadratic model)
|
||||
float cutoff; // OpenGL cutoff
|
||||
float exponent; // OpenGL exponent
|
||||
|
||||
Reference in New Issue
Block a user