72 bool isInstanced()
const {
return (myInstanceParms.size()>0); }
75 bool initSceneSetForRender(
84 bool isDirty()
const {
return myDirtyFlag; }
90 unsigned shadowmap_size,
94 bool is_raytrace) = 0;
102 unsigned shadowmap_index) {}
105 virtual bool needsShadowMap() = 0;
106 virtual bool hasShadowMap() = 0;
115 unsigned shadowmap_size,
119 unsigned shadowmap_index) {}
132 { myShadowMask=
mask; }
142 void *light_block,
int light_size,
143 void *shadow_block,
int shadow_size);
149 bool is_cube =
false);
209 static inline void intrusive_ptr_add_ref(
GR_Light *gl) { gl->
incref(); }
210 static inline void intrusive_ptr_release(
GR_Light *gl) { gl->
decref(); }
223 {
return getLight(myShadowingLight).get(); }
230 if (myReducedIndices.entries())
231 count =
SYSmin(myReducedIndices.entries() - myBaseIndex,
count);
232 if (myMaxLights >= 0)
233 count =
SYSmin(myMaxLights, count);
239 auto entry = myLightMap.find(
id);
240 return (entry != myLightMap.end());
246 auto entry = myLightMap.find(
id);
247 if(entry != myLightMap.end())
248 return myList(entry->second);
255 return myList(index);
260 index = myBaseIndex +
index;
261 if (myReducedIndices.isValidIndex(index))
262 index = myReducedIndices(index);
263 if (myList.isValidIndex(index))
264 return myList(index);
271 myLightMap[
id] =
int(myList.entries());
272 myList.append(new_light);
276 auto entry = myLightMap.find(
id);
277 if(entry != myLightMap.end())
279 int index = entry->second;
281 myList.removeIndex(index);
282 for(
int i=0; i<myList.entries(); i++)
283 myLightMap[myList(i)->id()] = i;
289 void removeAllBut(
const UT_Set<int> &active_lights);
290 void removeHeadLights();
294 return myBaseIndex != 0 || myMaxLights != -1
295 || !myReducedIndices.isEmpty();
306 myReducedIndices.clear();
310 bool myUseHeadlights =
false;
313 int myShadowingLight = -1;
315 exint myBaseIndex = 0;
316 exint myMaxLights = -1;
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
void setLightID(exint id)
virtual void finishGsplatShadowRenders(RE_RenderContext)
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
void setCanShadow(bool e)
UT_UniquePtr< RV_ShaderBlock > myShadowBlock
UT_UniquePtr< RV_ShaderBlock > myInstanceBlock
Base class for various things that can appear in a scene outside of geometry.
virtual void startGsplatShadowRender(RE_RenderContext, unsigned shadowmap_index)
const UT_StringHolder & shadowMask() const
void setInUseIndices(const UT_IntArray &list)
Opaque reference to a texture stored in the RV_TextureCache.
GR_LightPtr getLightByIndex(int index) const
virtual void clearShadowMap()
bool hasLight(int id) const
UT_IntrusivePtr< GR_Light > GR_LightPtr
virtual unsigned setupGsplatShadowRenders(RE_RenderContext, GR_RenderMode &out_render_mode, bool scene_changed, unsigned shadowmap_size, const GR_DistantShadowMapParms &)
UT_NON_COPYABLE(GR_SceneItem)
Temporary container for either a RV_Render and an RE_Render.
virtual void clearGsplatShadowMap()
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
bool hasRemapping() const
void setShadowEnabled(bool s)
void add(int id, GR_Light *new_light)
virtual void startShadowRender(RE_RenderContext rc, unsigned shadowmap_index)
void setBaseIndex(exint idx)
GLint GLint GLsizei GLint GLenum GLenum type
GR_LightPtr getLight(int id) const
const GR_Light * getShadowingLight() const
void setMaxLights(exint max)
virtual bool canRayTraceShadow() const
Base class for all light types.
RV_API void cleanupShaders()
const UT_StringHolder & lightLink() const
Wrapper around hboost::intrusive_ptr.
UT_UniquePtr< RV_ShaderBlock > myLightBlock
GLuint const GLchar * name
bool useHeadlights() const
void setLightLink(const UT_StringHolder &link)
virtual void finishGsplatShadowRender(RE_RenderContext)
GA_API const UT_StringHolder transform
Handle to the main interface of Vulkan.
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate active
virtual bool hasGsplatShadowMap()
virtual void attachShadowMap(RE_RenderContext)
RV_API bool initShaders(RV_Instance *inst)
GA_API const UT_StringHolder parms
virtual void finishShadowRenders(RE_RenderContext)
UT_StringHolder myShadowMask
GR_LightPtr getInUseLightByIndex(int index) const
UT_UniquePtr< RV_ShaderVariableSet > myLightSet
void setShadowingLight(int id)
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
bool shadowEnabled() const
void setHeadlight(bool e)
exint inUseLightCount() const
virtual void finishShadowRender(RE_RenderContext)
virtual void attachGsplatShadowMap(RE_RenderContext)
virtual void setShadowMask(const UT_StringHolder &mask)
void setUseHeadlights(bool v)