Skip to content

Commit

Permalink
plant test
Browse files Browse the repository at this point in the history
  • Loading branch information
neuroprod committed Dec 2, 2023
1 parent df95a4f commit b0f38d4
Show file tree
Hide file tree
Showing 16 changed files with 672 additions and 692 deletions.
Binary file modified frontend/public/outside.bin
Binary file not shown.
1,347 changes: 660 additions & 687 deletions frontend/public/outside.json

Large diffs are not rendered by default.

Binary file added frontend/public/textures/fern_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 added frontend/public/textures/fern_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 added frontend/public/textures/fern_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.
Binary file modified frontend/public/textures/groundFront_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/ground_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/midGround_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/rocksMedium_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/rocksMedium_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/rocksMedium_Normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions frontend/src/GLFTLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import AnimationChannelQuaternion from "./lib/animation/AnimationChannelQuaterni
import AnimationChannelVector3 from "./lib/animation/AnimationChannelVector3";
import Skin from "./lib/animation/Skin";
import GBufferShaderSkin from "./shaders/GBufferShaderSkin";
import {CullMode, GPUCullMode} from "./lib/WebGPUConstants";


type Accessor = {
Expand Down Expand Up @@ -105,6 +106,7 @@ export default class GLFTLoader {
}
if (m.model.mesh.label.includes("_AC")) {
m.model.castShadow=false;
m.model.material.cullMode =CullMode.None
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/PreloadData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export const preloadImages = [
"desk_Color",
"desk_MRA",
"desk_Normal",
"fern_AC_Color",
"fern_AC_MRA",
"fern_AC_Normal",
"fish_Color",
"fish_MRA",
"fish_Normal",
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/lib/WebGPUConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ export const GPUFrontFace = {
CW: 'cw'
};

export const GPUCullMode = {
None: 'none',
Front: 'front',
Back: 'back'
export const CullMode = {
None: 'none' as GPUCullMode,
Front: 'front' as GPUCullMode,
Back: 'back' as GPUCullMode
};

export const IndexFormat = {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/lib/core/Material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default class Material extends ObjectGPU {
private depthStencilState: GPUDepthStencilState;
private needsDepth: boolean = true;
public skin:Skin
public cullMode: "none" | "front" | "back" = "back";
constructor(renderer: Renderer, label: string, shader: Shader) {
super(renderer, label);
this.shader = shader;
Expand Down Expand Up @@ -75,7 +76,7 @@ export default class Material extends ObjectGPU {

primitive: {
topology: "triangle-list",
cullMode: "back",
cullMode: this.cullMode,
},
multisample: {
count: pass.sampleCount,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lib/model/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default class Model extends Object3D

public modelTransform: ModelTransform;
public visible: boolean =true;

constructor(renderer:Renderer,label:string) {
super(renderer,label);
this.modelTransform =new ModelTransform(renderer,label+"_transform")
Expand Down

0 comments on commit b0f38d4

Please sign in to comment.