11 #ifndef SLLIGHTSPHERE_H
12 #define SLLIGHTSPHERE_H
61 float lightClipFar = 20.0f,
66 int numCascades = 0)
override;
91 ortLight optixLight(
bool doDistributed)
93 ortSamples loc_samples{};
103 loc_samples = {1, 1};
106 return {make_float4(
diffuse()),
SLVec2< SLfloat > SLVec2f
SLVec4< SLfloat > SLVec4f
Toplevel holder of the assets meshes, materials, textures and shaders.
Active or visible camera node class.
Abstract Light class for OpenGL light sources.
SLCol4f _ambientColor
Ambient light color (RGB 0-1)
SLfloat _diffusePower
Diffuse light power (0-N)
SLfloat spotCutOffDEG() const
SLfloat spotCosCut() const
SLfloat _specularPower
Specular light power (0-N)
SLCol4f _diffuseColor
Diffuse light color (RGB 0-1)
SLfloat _ambientPower
Ambient light power (0-N)
SLfloat spotExponent() const
SLCol4f _specularColor
Specular light color (RGB 0-1)
SLLightSpot class for a spot light source.
bool hitRec(SLRay *ray) override
void samples(SLuint x, SLuint y)
SLVec3f spotDirWS() override
SLfloat shadowTestMC(SLRay *ray, const SLVec3f &L, SLfloat lightDist, SLNode *root3D) override
SLRaySamples2D _samples
2D sample points for soft shadows
void createShadowMapAutoSize(SLCamera *camera, SLVec2i texSize=SLVec2i(1024, 1024), int numCascades=0) override
void createShadowMap(float lightClipNear=0.1f, float lightClipFar=20.0f, SLVec2f size=SLVec2f(8, 8), SLVec2i texSize=SLVec2i(1024, 1024)) override
SLCol4f diffuse() override
Returns normally _diffuseColor * _diffusePower.
void drawMesh(SLSceneView *sv) override
void statsRec(SLNodeStats &stats) override
SLLightSpot::statsRec updates the statistic parameters.
SLCol4f specular() override
Returns normally _specularColor * _specularPower.
SLfloat shadowTest(SLRay *ray, const SLVec3f &L, SLfloat lightDist, SLNode *root3D) override
SLfloat _radius
The sphere lights radius.
SLCol4f ambient() override
Return normally _ambientColor * _ambientPower.
SLVec4f positionWS() const override
SLLightSpot(SLAssetManager *assetMgr, SLScene *s, SLfloat radius=0.3f, SLfloat spotAngleDEG=180.0f, SLbool hasMesh=true)
Construct a new SLLightSpot::SLLightSpot object.
SLNode represents a node in a hierarchical scene graph.
SLVec3f translationWS() const
SLVec3f forwardWS() const
Ray class with ray and intersection properties.
Class for 2D disk sample points.
void samples(SLuint x, SLuint y, SLbool evenlyDistributed=true)
Resets the sample point array by the sqrt of the no. of samples.
The SLScene class represents the top level instance holding the scene structure.
SceneView class represents a dynamic real time 3D view onto the scene.
Struct for scene graph statistics.