forked from Orillusion/orillusion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Graphic3D debug draw use engine internal apis (Orillusion#334)
chore: Graphic3DLine use engine internal apis
- Loading branch information
1 parent
75c302b
commit 2bd1994
Showing
10 changed files
with
169 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/gfx/renderJob/passRenderer/graphic/Graphic3DFixedRenderMaterial.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Engine3D, GPUPrimitiveTopology, RenderShaderPass, Shader, ShaderLib, Texture } from "../../../.."; | ||
import { Graphic3DShader } from "../../../../assets/shader/graphic/Graphic3DShader"; | ||
import { Material } from "../../../../materials/Material"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export class Graphic3DFixedRenderMaterial extends Material { | ||
/** | ||
* @constructor | ||
*/ | ||
constructor(topology: GPUPrimitiveTopology = GPUPrimitiveTopology.triangle_list) { | ||
super(); | ||
ShaderLib.register('Graphic3DShader', Graphic3DShader); | ||
|
||
let colorPass = new RenderShaderPass('Graphic3DShader', 'Graphic3DShader'); | ||
colorPass.setShaderEntry(`VertMain`, `FragMain`); | ||
colorPass.noticeValueChange(); | ||
|
||
let shader = new Shader(); | ||
shader.addRenderPass(colorPass); | ||
this.shader = shader; | ||
|
||
let shaderState = colorPass.shaderState; | ||
shaderState.acceptShadow = false; | ||
shaderState.castShadow = false; | ||
shaderState.receiveEnv = false; | ||
shaderState.acceptGI = false; | ||
shaderState.useLight = false; | ||
shaderState.topology = topology; | ||
} | ||
} |
Oops, something went wrong.