Some aspects pertain to ray data storage for ray tracing rendering. Attribute data for a first ray can be stored. To define a second ray, data defining such can comprise a reference to the first ray (in one example) and attribute source information indicative of shared attributes between the first and second rays. The attribute source information can be shared among many rays, and can be selected based on ray type. Definition data for unshared attributes can be explicit with the second ray. A plurality of rays can reference one ray for shared attribute data. Referencing rays can be counted and decremented as referencing rays complete. Shared attributes can be indicated with masks. Interface modules can service ray data read and write requests made by shaders, and shaders can explicitly reference attributes of rays, without using such interfacing modules. Data structures can be used as attribute sources without being associated with particular rays, and can be defined and selected as attribute data sources based on ray type.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A method for processing rays in a ray tracing renderer, comprising: storing attribute data for a first ray in a location of a memory; identifying a shader module to execute in response to an intersection testing result for the first ray in a 3-D scene; providing for execution of the shader module in a processor, wherein the execution results in a second ray for intersection testing; storing data for the second ray comprising a reference to the location of the memory storing attribute data for the first ray and data explicitly defining one or more attributes of the second ray; accessing attribute source information indicating which second ray attributes are to be obtained from the location of the memory storing attribute data for the first ray and which second ray attributes are explicitly defined by the data stored for the second ray; and sourcing, from the location of the memory storing attribute data for the first ray, the attributes indicated to be obtained from the location of the memory storing attribute data for the first ray by the attribute source information, for use in shading an intersection involving the second ray.
2. The method of claim 1 , further comprising storing data for a plurality of rays in the memory, data for the plurality of rays comprising respective references to sources of attributes for each ray of the plurality, each reference identifying a memory location storing attribute data for ray different a ray of the plurality of rays associated with that reference.
3. The method of claim 2 , wherein the data stored for the plurality of rays further comprises a reference to shared attribute source information descriptive of attributes to be sourced from their respective attribute sources.
4. The method of claim 1 , further comprising flagging the first ray as a referenceable ray, and conditioning the storing of data for the second ray comprising the reference to the location of the memory storing attribute data for the first ray based on the first ray being flagged as referenceable.
5. The method of claim 1 , wherein the storing of data for the second ray further comprises forming the reference to the location of the memory storing attribute data for the first ray to identify at least a portion of a data structure with attributes associated with the first ray.
6. The method of claim 1 , wherein the attribute source information comprises a bit for each attribute of the second ray indicating if that attribute is to be sourced from the location of the memory storing attribute data for the first ray.
7. The method of claim 1 , wherein the attribute source information comprises bits indicating whether the second ray has multiple attribute sources.
8. The method of claim 1 , wherein the location of the memory storing attribute data for the first ray source of attributes is one source of attributes of a plurality of attribute sources, each source identifiable in the attribute source information by a respective reference.
9. The method of claim 8 , wherein each of the plurality of attribute sources is either a data structure associated with a particular ray or a data structure stored in memory made referenceable for use during ray emission.
10. The method of claim 1 , further comprising using ray type information associated with the second ray to identify the attribute source information.
11. A non-transitory computer readable medium having stored thereon computer executable code for programming a processor to execute a method of accepting ray data from shader modules, the method comprising: storing in one or more locations in a memory one or more attributes identified as being available for reference by rays upon their emission; storing data defining a first ray, the definition data for the ray comprising a reference to at least one of the stored attributes; running a shader code module in response to an intersection testing result for the ray; using the reference to the at least one stored attribute to obtain data defining the at least one stored attribute for use by the shader code module; and providing definition data for a second ray, the definition data comprising attribute source information indicating which attributes of the second ray are to be sourced from the one or more attributes stored in the one or more locations in memory, and which attributes of the second ray are explicitly defined in the definition data for the second ray.
12. The non-transitory computer readable medium of claim 11 , wherein a plurality of rays reference at least one of the stored attributes, and the method further comprises maintaining a count of a number of rays that reference that stored attribute.
13. The non-transitory computer readable medium of claim 11 , wherein the storing data defining the first ray further comprises storing attribute source information indicating which attributes of the first ray are to be defined by reference to the stored attributes.
14. A system for managing ray memory in rendering with ray tracing, comprising: a memory for storing ray attribute data; a processor configurable with computer executable shader code modules to produce rays to be intersection tested in a 3-D scene, the processor interfacing with the memory; and a module configured for effecting storage of definition data for a first ray in a first data structure in the memory, the definition data comprising identification of an attribute of the first ray that is present in a separate second data structure that is already stored in the memory, a reference to the separate second data structure, and data explicitly defining an attribute of the first ray distinct from attributes stored in that separate second data structure.
15. The system of claim 14 , wherein the separate data structure is referenced by the first ray and a plurality of other rays for at least one attribute in the separate data structure.
16. The system of claim 14 , wherein the module is further configured for identifying a respective type for each ray produced, and for identifying attribute source information indicating which attributes are defined by reference, and which are defined explicitly for that type of ray.
17. The system of claim 16 , wherein the memory stores a plurality of rays that are defined for a single ray type, each referencing a respective predecessor ray for an attribute identified by the attribute source information for that single ray type.
18. A non-transitory computer readable medium storing computer executable instructions comprising a shader code module for configuring a processor, the shader code module comprising: computer executable code to receive identifying information for a first ray that caused the shader code module to be run as a result of intersection testing; computer executable code for reading definition data for the first ray from a memory location storing a data structure for the first ray; computer executable code for parsing the definition data to determine whether an attribute of the first ray is defined explicitly in the data structure or by reference to an attribute source other than ray data structure for the first ray; computer executable code for reading data descriptive of the attribute, for use if the attribute is defined by reference to an attribute source other than the data structure for the first ray; and computer executable code for computing a shading effect using the attribute.
19. The non-transitory computer readable medium of claim 18 , wherein the first ray attribute comprises one or more of computer executable code to be executed after completion of the shader code module, and a pointer to computer executable code to be executed after completion of the shader code module.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
June 24, 2010
August 5, 2014
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.