Skip to content

Commit

Permalink
Align OpenPBR material parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
StuckiSimon committed Aug 28, 2024
1 parent d213769 commit 19170c2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
5 changes: 2 additions & 3 deletions strahl-lib/src/buffers/material-buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,17 @@ export function generateMaterialBuffer(
specularColor: m.oSpecularColor,
specularRoughness: m.oSpecularRoughness,
specularAnisotropy: m.oSpecularRoughnessAnisotropy,
specularIor: m.oSpecularIOR,
specularIor: m.oSpecularIor,
coatWeight: m.oCoatWeight,
coatColor: m.oCoatColor,
coatRoughness: m.oCoatRoughness,
coatRoughnessAnisotropy: m.oCoatRoughnessAnisotropy,
// todo: Align casing for IOR parameter
coatIor: m.oCoatIor,
coatDarkening: m.oCoatDarkening,
emissionLuminance: m.oEmissionLuminance,
emissionColor: m.oEmissionColor,
thinFilmThickness: m.oThinFilmThickness,
thinFilmIOR: m.oThinFilmIOR,
thinFilmIor: m.oThinFilmIor,
};
}),
);
Expand Down
7 changes: 4 additions & 3 deletions strahl-lib/src/openpbr-material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export class OpenPBRMaterial {
oSpecularColor: Color = [1.0, 1.0, 1.0];
oSpecularRoughness: number = 0.3;
oSpecularRoughnessAnisotropy: number = 0.0;
oSpecularIOR: number = 1.5;
oSpecularIor: number = 1.5;
// NOTE: Coat workflow is not yet supported by the renderer
oCoatWeight: number = 0.0;
oCoatColor: Color = [1.0, 1.0, 1.0];
oCoatRoughness: number = 0.0;
Expand All @@ -19,9 +20,9 @@ export class OpenPBRMaterial {
oCoatDarkening: number = 1.0;
oEmissionLuminance: number = 0.0;
oEmissionColor: Color = [1.0, 1.0, 1.0];
// todo: add oThinFilmWeight
// NOTE: Thin-film workflow is not yet supported by the renderer
oThinFilmThickness: number = 0.5;
oThinFilmIOR: number = 1.5;
oThinFilmIor: number = 1.5;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion strahl-lib/src/shaders/denoise-pass-shader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct Material {
emissionLuminance: f32,
emissionColor: Color,
thinFilmThickness: f32,
thinFilmIOR: f32,
thinFilmIor: f32,
}
struct UniformData {
Expand Down
4 changes: 2 additions & 2 deletions strahl-lib/src/shaders/tracer-shader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct Material {
emissionLuminance: f32,
emissionColor: Color,
thinFilmThickness: f32,
thinFilmIOR: f32,
thinFilmIor: f32,
}
struct UniformData {
Expand Down Expand Up @@ -212,7 +212,7 @@ struct FresnelData {
F90: vec3f,
exponent: f32,
thinFilmThickness: f32,
thinFilmIOR: f32,
thinFilmIor: f32,
refraction: bool,
}
Expand Down

0 comments on commit 19170c2

Please sign in to comment.