Skip to content

Commit 3309419

Browse files
committed
rgb19e7 bug
1 parent dc41516 commit 3309419

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

examples_tests/22.RaytracedAO/raygen.comp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ void main()
154154
}
155155

156156
// decode vis buffer
157-
vec3 emissive = vec3(0.0,0.0,0.0);
157+
vec3 emissive = vec3(0.0,1.0,0.0);
158158
{
159159
const uint objectID = visBuffer[0]&0x7fffffffu;
160160
const uint triangleID = visBuffer[1];
@@ -163,7 +163,7 @@ void main()
163163
nbl_glsl_MC_oriented_material_t material = nbl_glsl_MC_material_data_t_getOriented(InstData.data[objectID].material,frontfacing);
164164

165165
// use loaded data
166-
emissive = nbl_glsl_MC_oriented_material_t_getEmissive(material);
166+
//emissive = nbl_glsl_MC_oriented_material_t_getEmissive(material);
167167
gcs = nbl_glsl_MC_oriented_material_t_getGenChoiceStream(material);
168168
rnps = nbl_glsl_MC_oriented_material_t_getRemAndPdfStream(material);
169169

examples_tests/22.RaytracedAO/raytraceCommon.glsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,13 @@ layout(set = 1, binding = 5, std430, row_major) restrict readonly buffer LightRa
138138
vec3 fetchAccumulation(in ivec2 coord)
139139
{
140140
const uvec2 data = imageLoad(accumulation,coord).rg;
141-
return vec4(unpackHalf2x16(data[0]),unpackHalf2x16(data[1])).rgb;
142-
//return nbl_glsl_decodeRGB19E7(data);
141+
//return vec4(unpackHalf2x16(data[0]),unpackHalf2x16(data[1])).rgb;
142+
return nbl_glsl_decodeRGB19E7(data);
143143
}
144144
void storeAccumulation(in vec3 color, in ivec2 coord)
145145
{
146-
//const uvec2 data = nbl_glsl_encodeRGB19E7(color);
147-
const uvec2 data = uvec2(packHalf2x16(color.rg),packHalf2x16(vec2(color.b,1.0)));
146+
const uvec2 data = nbl_glsl_encodeRGB19E7(color);
147+
//const uvec2 data = uvec2(packHalf2x16(color.rg),packHalf2x16(vec2(color.b,1.0)));
148148
imageStore(accumulation,coord,uvec4(data,0u,0u));
149149
}
150150

examples_tests/22.RaytracedAO/resolve.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void main()
3434

3535
const bool frontface = true; // TODO: how to determine frontface easily from radeon rays!? barycentrics? ray direction vs. oriented cross product?
3636
nbl_glsl_MC_oriented_material_t material = nbl_glsl_MC_material_data_t_getOriented(InstData.data[hit.shapeid].material,frontface);
37-
color += nbl_glsl_MC_oriented_material_t_getEmissive(material)*thoughput;
37+
//color += nbl_glsl_MC_oriented_material_t_getEmissive(material)*thoughput;
3838

3939
// hit buffer needs clearing
4040
hits[rayID].shapeid = -1;

0 commit comments

Comments
 (0)