maierfelix / maierfelix/webgpu
Getting normals for RT
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 248
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I need to get the normal to the surface that the ray hits.
Basically, at least the coordinates of the vertices of the triangle are required.
I found this article https://www.khronos.org/blog/introducing-vulkan-ray-tracing-position-fetch-extension
It follows from it that you can get the coordinates of the vertices as follows:
#extension GL_EXT_ray_tracing_position_fetch : require
...
vec3 vertPos0 = gl_HitTriangleVertexPositionsEXT[0];
vec3 vertPos1 = gl_HitTriangleVertexPositionsEXT[1];
vec3 vertPos2 = gl_HitTriangleVertexPositionsEXT[2];
But in addition to this, it is necessary to enable the VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR flag in the acceleration structure during build.
Tell me how to do this in your library?
In addition, tell me, is it possible to add an array of normals/UVs to geometry (from an .obj file for example) without using additional uniform buffers for ray tracing shaders?
Well, one more question: how to add textures/materials for objects in order to render many different objects in one call?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files, tests, or entry points. Start by reading the linked Vulkan ray-tracing position-fetch article and comparing its requirements with this library; the requested outcome spans hit normals, vertex attributes, and textures or materials for multiple objects, but no single completion criterion is defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100