Skip to content

Commit

Permalink
-ui cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
neuroprod committed Dec 11, 2023
1 parent c1ad9a7 commit 72d2e09
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 12 deletions.
Binary file modified frontend/public/textures/pineLeaves_AC_Color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/public/textures/pineLeaves_AC_MRA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/public/textures/pineLeaves_AC_Normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions frontend/src/Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,18 +317,23 @@ export default class Main {



UI.pushWindow("Performance")
/* UI.pushWindow("Performance")
if (!this.renderer.useTimeStampQuery) UI.LText("Enable by running Chrome with: --enable-dawn-features=allow_unsafe_apis", "", true)
this.timeStampQuery.onUI();
UI.popWindow()

UI.popWindow()*/
UI.pushWindow("Light")
this.lightRoomPass.onUI();
this.lightOutsidePass.onUI(this.shadowPass.camera.viewProjection);
this.shadowPass.onUI()

UI.popWindow()


UI.pushWindow("Render Setting")
UI.pushGroup("Performance");
if (!this.renderer.useTimeStampQuery) UI.LText("Enable by running Chrome with: --enable-dawn-features=allow_unsafe_apis", "", true)
this.timeStampQuery.onUI();
UI.popGroup()

this.canvasRenderPass.onUI();
UI.pushGroup("AO");
this.aoPass.onUI();
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/renderPasses/LightOutsideRenderPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default class LightOutsideRenderPass extends RenderPass {


onUI(matrix:Matrix4) {
UI.pushWindow("Light Outside")
UI.pushGroup("Light Outside")

UI.separator("Sun Light")
UI.LVector("dir",this.sunDir,true);
Expand Down Expand Up @@ -166,7 +166,7 @@ export default class LightOutsideRenderPass extends RenderPass {
this.globalLightMaterial.uniforms.setUniform("pointlightColor",this.lightColor);
this.globalLightMaterial.uniforms.setUniform("pointlightPos",this.lightGrave.getWorldPos());

UI.popWindow()
UI.popGroup()
}

onSettingsChange() {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/renderPasses/LightRoomRenderPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class LightRoomRenderPass extends RenderPass {


onUI() {
UI.pushWindow("Light Room")
UI.pushGroup("Light Inside")
for (let p of this.lights) {
p.update()
}
Expand Down Expand Up @@ -194,8 +194,8 @@ export default class LightRoomRenderPass extends RenderPass {
}

}
UI.popGroup()

UI.popWindow()
}

draw() {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/renderPasses/ShadowPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ export default class ShadowPass extends RenderPass {
}
onUI()
{
UI.pushWindow("shadowCam");
UI.pushGroup("shadowCam");
this.camera.onUI();
UI.popWindow();
UI.popGroup();
}
draw() {

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/shaders/GBufferShader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fn mainFragment(@location(0) uv0: vec2f,@location(1) normal: vec3f,@location(2)
{
var output : GBufferOutput;
output.color = textureSample(colorTexture, mySampler, uv0);
if(output.color.w<0.9){discard;}
if(output.color.w<0.5){discard;}
var normalText = textureSample(normalTexture, mySampler, uv0).xyz* 2. - 1.;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/shaders/GlobalLightOutsideShader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ fn mainFragment(@location(0) uv0: vec2f) -> @location(0) vec4f
for (var y = -1; y <= 1; y++) {
for (var x = -1; x <= 1; x++) {
let offset = vec2<f32>(vec2i(x, y)) * oneOverShadowDepthTextureSize;
shadowVal += textureSampleCompare(shadow, mySamplerComp, shadowUV+offset, shadowProjN.z-0.007);
shadowVal += textureSampleCompare(shadow, mySamplerComp, shadowUV+offset, shadowProjN.z-0.004);
}
}
shadowVal/=9.0;
Expand Down

0 comments on commit 72d2e09

Please sign in to comment.