Skip to content

Commit

Permalink
use proper materials in direct lighting integrator
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpil committed Jul 7, 2024
1 parent 5ac285c commit b8ef4d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shaders/hrtsystem/integrator.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ struct DirectLightIntegrator : Integrator {
Geometry geometry = scene.world.getGeometry(instanceID, its.geometryIndex);
MeshAttributes attrs = MeshAttributes::lookupAndInterpolate(scene.world, its.instanceIndex, its.geometryIndex, its.primitiveIndex, its.barycentrics).inWorld(scene.world, its.instanceIndex);
Frame textureFrame = getTextureFrame(scene.world, scene.world.materialIdx(instanceID, its.geometryIndex), attrs.texcoord, attrs.frame);
StandardPBR material = StandardPBR::load(scene.world.materials[NonUniformResourceIndex(scene.world.materialIdx(instanceID, its.geometryIndex))].materialAddress, attrs.texcoord);
MaterialVariantData materialData = scene.world.materials[NonUniformResourceIndex(scene.world.materialIdx(instanceID, its.geometryIndex))];
MaterialVariant material = MaterialVariant::load(materialData.type, materialData.materialAddress, attrs.texcoord);

float3 outgoingDirWs = -initialRay.Direction;

Expand Down

0 comments on commit b8ef4d9

Please sign in to comment.