Skip to content

Commit 495b8ac

Browse files
committed
Always use HalfFloatType for emission buffer
1 parent cf20599 commit 495b8ac

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

src/passes/GeometryPass.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -303,25 +303,22 @@ export class GeometryPass extends Pass implements GeometryPassOptions, Selective
303303
minFilter: NearestFilter,
304304
magFilter: NearestFilter,
305305
type: HalfFloatType,
306-
format: RGBAFormat,
307-
isColorBuffer: false
306+
format: RGBAFormat
308307
});
309308

310309
textureConfigs.set(GBuffer.ORM, {
311310
minFilter: NearestFilter,
312311
magFilter: NearestFilter,
313312
type: UnsignedByteType,
314-
format: RGBAFormat,
315-
isColorBuffer: false
313+
format: RGBAFormat
316314
});
317315

318316
textureConfigs.set(GBuffer.EMISSION, {
319317
minFilter: LinearFilter,
320318
magFilter: LinearFilter,
321-
type: this.frameBufferType,
322-
format: useSmallFloatFormat ? RGBFormat : RGBAFormat,
323-
internalFormat: useSmallFloatFormat ? "R11F_G11F_B10F" : undefined,
324-
isColorBuffer: true
319+
type: HalfFloatType,
320+
format: RGBFormat,
321+
internalFormat: "R11F_G11F_B10F"
325322
});
326323

327324
}
@@ -402,7 +399,7 @@ export class GeometryPass extends Pass implements GeometryPassOptions, Selective
402399

403400
for(const entry of this.textureConfigs) {
404401

405-
if(entry[1].isColorBuffer && indices.has(entry[0])) {
402+
if(entry[1].isColorBuffer === true && indices.has(entry[0])) {
406403

407404
const index = indices.get(entry[0])!;
408405
gBuffer.textures[index].colorSpace = colorSpace;

src/utils/GBufferTextureConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ export interface GBufferTextureConfig {
4848
* Indicates whether the texture stores color values.
4949
*/
5050

51-
isColorBuffer: boolean;
51+
isColorBuffer?: boolean;
5252

5353
}

0 commit comments

Comments
 (0)