From fc74fa1a369a48de72bc888fd76b46d6b57a9089 Mon Sep 17 00:00:00 2001 From: ShuangLiu Date: Sun, 28 Jul 2024 04:29:42 +0800 Subject: [PATCH] chore: clear shader docs --- packages/debug/GUIHelp.ts | 1 + .../effect/grass/shader/GrassBaseShader.ts | 3 + .../grass/shader/GrassCastShadowShader.ts | 3 + packages/effect/grass/shader/GrassShader.ts | 3 + .../shader/GrassVertexAttributeShader.ts | 3 + .../compute/graphic3d/Graphic3DShader.ts | 3 + .../compute/graphic3d/GraphicDecCompute.ts | 3 + .../graphic3d/GraphicDynamicCompute.ts | 3 + .../compute/graphic3d/GraphicFaceComput2.ts | 3 + .../compute/graphic3d/GraphicFaceCompute.ts | 3 + .../compute/graphic3d/GraphicFaceCompute3.ts | 3 + .../compute/graphic3d/GraphicLineCompute.ts | 3 + .../compute/graphic3d/GraphicTrailCompute.ts | 3 + .../compute/graphic3d/GraphicTrailCompute2.ts | 3 + .../compute/grass/GrassAnimCompute_cs.ts | 3 + .../compute/grass/GrassGeometryCompute_cs.ts | 3 + .../compute/shape3d/CircleShape3DCode_cs.ts | 3 + .../compute/shape3d/EllipseShape3DCode_cs.ts | 3 + .../compute/shape3d/Path2DShape3DCode_cs.ts | 3 + .../compute/shape3d/Path3DShape3DCode_cs.ts | 3 + .../shape3d/RoundRectShape3DCode_cs.ts | 3 + .../compute/shape3d/Shape3DCommonCode_cs.ts | 3 + .../shape3d/Shape3DKeyPointCompute_cs.ts | 3 + .../shape3d/Shape3DVertexCompute_cs.ts | 3 + .../shape3d/Shape3DVertexFillZero_cs.ts | 3 + packages/media-extention/ChromaKeyShader.ts | 3 + packages/media-extention/VideoShader.ts | 3 + .../particle/shader/ParticleRenderShader.ts | 3 + .../shader/Particle_Mass_UnLight_shader.ts | 1 + .../compute_density_pressure_compute.ts | 1 + packages/physics/Physics.ts | 3 + .../shader/anim/SkeletonAnimation_shader.ts | 3 + .../shader/cluster/ClusterBoundsSource_cs.ts | 3 + .../shader/cluster/ClusterLighting_cs.ts | 3 + src/assets/shader/compute/BLUR_CsShader.ts | 3 + src/assets/shader/compute/BRDFLUT.ts | 4 +- src/assets/shader/compute/BloomEffect_cs.ts | 29 +- .../shader/compute/BlurEffectCreator_cs.ts | 6 + .../shader/compute/DDGIIrradiance_Cs.ts | 3 + .../shader/compute/DDGILighting_CSShader.ts | 3 + src/assets/shader/compute/DepthOfView_cs.ts | 3 + .../compute/ErpImage2CubeMapCreateCube_cs.ts | 3 + .../compute/ErpImage2CubeMapRgbe2rgba_cs.ts | 3 + src/assets/shader/compute/GTAO_cs.ts | 3 + src/assets/shader/compute/GodRay_cs.ts | 3 + .../shader/compute/IBLEnvMapCreator_cs.ts | 3 + src/assets/shader/compute/MergeRGBA_cs.ts | 3 + .../shader/compute/MultiBouncePass_cs.ts | 4 +- .../shader/compute/OutLineBlendColor_cs.ts | 3 + .../shader/compute/OutlineCalcOutline_cs.ts | 4 +- src/assets/shader/compute/Outline_cs.ts | 3 + src/assets/shader/compute/Picker_cs.ts | 4 +- .../compute/PreFilteredEnvironment_cs copy.ts | 3 + .../compute/PreFilteredEnvironment_cs.ts | 3 + src/assets/shader/compute/PreIntegratedLut.ts | 4 +- src/assets/shader/compute/SSAO_cs.ts | 3 + src/assets/shader/compute/SSGI2_cs.ts | 3 + .../shader/compute/SSR_BlendColor_cs.ts | 3 + src/assets/shader/compute/SSR_IS_cs.ts | 3 + src/assets/shader/compute/SSR_RayTrace_cs.ts | 3 + src/assets/shader/compute/TAACopyTex_cs.ts | 3 + src/assets/shader/compute/TAASharpTex_cs.ts | 3 + src/assets/shader/compute/TAA_cs.ts | 3 + src/assets/shader/compute/utils/Combine_cs.ts | 3 + .../shader/compute/utils/Denoising_cs.ts | 3 + .../compute/utils/TestComputeLoadBuffer.ts | 3 + src/assets/shader/compute/utils/tw.ts | 3 + src/assets/shader/core/base/Common_frag.ts | 3 + src/assets/shader/core/base/Common_vert.ts | 3 + src/assets/shader/core/common/BrdfLut_frag.ts | 3 + src/assets/shader/core/common/EnvMap_frag.ts | 3 + src/assets/shader/core/common/GBufferStand.ts | 3 + .../shader/core/common/GlobalUniform.ts | 3 + .../shader/core/common/InstanceUniform.ts | 3 + .../shader/core/common/SHCommon_frag.ts | 4 +- .../shader/core/common/WorldMatrixUniform.ts | 3 + src/assets/shader/core/inline/Inline_vert.ts | 3 + .../shader/core/pass/CastShadow_pass.ts | 13 + .../shader/core/pass/FrustumCulling_cs.ts | 3 + src/assets/shader/core/pass/GBuffer_pass.ts | 3 + .../shader/core/pass/SkyGBuffer_pass.ts | 3 + src/assets/shader/core/pass/ZPassShader_cs.ts | 3 + src/assets/shader/core/pass/ZPassShader_fs.ts | 3 + src/assets/shader/core/pass/ZPassShader_vs.ts | 3 + src/assets/shader/core/struct/ClusterLight.ts | 3 + .../core/struct/ColorPassFragmentOutput.ts | 5 +- .../shader/core/struct/FragmentOutput.ts | 5 +- .../shader/core/struct/FragmentVarying.ts | 4 +- src/assets/shader/core/struct/ShadingInput.ts | 3 + .../core/struct/VertexAttributeIndexShader.ts | 4 +- .../shader/core/struct/VertexAttributes.ts | 3 + src/assets/shader/glsl/Quad_glsl.ts | 5 +- src/assets/shader/lighting/BRDF_frag.ts | 3 + src/assets/shader/lighting/BsDF_frag.ts | 3 + src/assets/shader/lighting/BxDF_frag.ts | 3 + src/assets/shader/lighting/Hair_frag.ts | 3 + .../shader/lighting/IESProfiles_frag.ts | 3 + .../lighting/IrradianceVolumeData_frag.ts | 5 +- src/assets/shader/lighting/Irradiance_frag.ts | 3 + .../shader/lighting/LightingFunction_frag.ts | 3 + src/assets/shader/lighting/UnLit_frag.ts | 3 + src/assets/shader/materials/ColorLitShader.ts | 3 + src/assets/shader/materials/GIProbeShader.ts | 3 + src/assets/shader/materials/GlassShader.ts | 3 + src/assets/shader/materials/Hair_shader.ts | 6 + src/assets/shader/materials/Lambert_shader.ts | 3 + src/assets/shader/materials/Lit_shader.ts | 3 + src/assets/shader/materials/OutlinePass.ts | 3 + src/assets/shader/materials/PBRLItShader.ts | 3 + .../shader/materials/PBRLitSSSShader.ts | 3 + src/assets/shader/materials/PavementShader.ts | 3 + .../shader/materials/PointShadowDebug.ts | 3 + .../materials/ReflectionShader_shader.ts | 3 + src/assets/shader/materials/UnLit.ts | 3 + .../shader/materials/UnLitTextureArray.ts | 3 + .../materials/program/BxdfDebug_frag.ts | 3 + .../materials/program/Clearcoat_frag.ts | 7 +- .../materials/program/ClusterDebug_frag.ts | 3 + .../materials/program/NormalMap_frag.ts | 3 + .../materials/program/ShadowMapping_frag.ts | 3 + .../materials/uniforms/MaterialUniform.ts | 3 + .../uniforms/PhysicMaterialUniform_frag.ts | 3 + .../uniforms/UnLitMaterialUniform_frag.ts | 3 + .../materials/uniforms/VideoUniform_frag.ts | 3 + src/assets/shader/math/FastMathShader.ts | 3 + src/assets/shader/post/FXAAShader.ts | 3 + src/assets/shader/post/GlobalFog_shader.ts | 3 + src/assets/shader/quad/Quad_shader.ts | 22 +- src/assets/shader/sky/CubeSky_Shader.ts | 3 + src/assets/shader/utils/BitUtil.ts | 3 + src/assets/shader/utils/ColorUtil.ts | 3 + src/assets/shader/utils/GenerayRandomDir.ts | 5 +- src/index.ts | 1 - .../parser/gltf/GLTFSubParserConverter.ts | 3 - .../gltf/extends/KHR_materials_clearcoat.ts | 8 +- .../parser/prefab/mats/shader/StandShader.ts | 1 - src/materials/LitMaterial.ts | 4 - src/materials/MaterialRegister.ts | 1 - src/materials/PhysicMaterial.ts | 516 ------------------ 139 files changed, 445 insertions(+), 562 deletions(-) delete mode 100644 src/materials/PhysicMaterial.ts diff --git a/packages/debug/GUIHelp.ts b/packages/debug/GUIHelp.ts index 841bd6ec..5722ca25 100644 --- a/packages/debug/GUIHelp.ts +++ b/packages/debug/GUIHelp.ts @@ -181,6 +181,7 @@ class _GUIHelp { } } } + /** * @internal */ diff --git a/packages/effect/grass/shader/GrassBaseShader.ts b/packages/effect/grass/shader/GrassBaseShader.ts index 820d7844..4f963b85 100644 --- a/packages/effect/grass/shader/GrassBaseShader.ts +++ b/packages/effect/grass/shader/GrassBaseShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GrassBaseShader = /*wgsl*/ ` #include "GlobalUniform" #include "FragmentOutput" diff --git a/packages/effect/grass/shader/GrassCastShadowShader.ts b/packages/effect/grass/shader/GrassCastShadowShader.ts index ebe89e51..5929a65c 100644 --- a/packages/effect/grass/shader/GrassCastShadowShader.ts +++ b/packages/effect/grass/shader/GrassCastShadowShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GrassCastShadowShader = /* wgsl */` #include "WorldMatrixUniform" #include "GrassVertexAttributeShader" diff --git a/packages/effect/grass/shader/GrassShader.ts b/packages/effect/grass/shader/GrassShader.ts index dbffd135..a5c8a8a7 100644 --- a/packages/effect/grass/shader/GrassShader.ts +++ b/packages/effect/grass/shader/GrassShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GrassShader = /* wgsl */` #include "WorldMatrixUniform" #include "GrassVertexAttributeShader" diff --git a/packages/effect/grass/shader/GrassVertexAttributeShader.ts b/packages/effect/grass/shader/GrassVertexAttributeShader.ts index 6b457dc8..54b9f5ed 100644 --- a/packages/effect/grass/shader/GrassVertexAttributeShader.ts +++ b/packages/effect/grass/shader/GrassVertexAttributeShader.ts @@ -1,4 +1,7 @@ +/** + * @internal + */ export let GrassVertexAttributeShader: string = /*wgsl*/ ` #include "WorldMatrixUniform" struct VertexAttributes{ diff --git a/packages/graphic/compute/graphic3d/Graphic3DShader.ts b/packages/graphic/compute/graphic3d/Graphic3DShader.ts index c2105ffd..23b02765 100644 --- a/packages/graphic/compute/graphic3d/Graphic3DShader.ts +++ b/packages/graphic/compute/graphic3d/Graphic3DShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Graphic3DShader: string = /*wgsl*/ ` #include "WorldMatrixUniform" #include "GlobalUniform" diff --git a/packages/graphic/compute/graphic3d/GraphicDecCompute.ts b/packages/graphic/compute/graphic3d/GraphicDecCompute.ts index d06940d3..6bdfbeb2 100644 --- a/packages/graphic/compute/graphic3d/GraphicDecCompute.ts +++ b/packages/graphic/compute/graphic3d/GraphicDecCompute.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let graphicDecCompute = (segmentCode: number) => { let code = /*wgsl*/` #include "GlobalUniform" diff --git a/packages/graphic/compute/graphic3d/GraphicDynamicCompute.ts b/packages/graphic/compute/graphic3d/GraphicDynamicCompute.ts index 16b71255..754ff0b2 100644 --- a/packages/graphic/compute/graphic3d/GraphicDynamicCompute.ts +++ b/packages/graphic/compute/graphic3d/GraphicDynamicCompute.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let graphicDynamicCompute = (subCode: string) => { let code = /*wgsl*/` #include "GlobalUniform" diff --git a/packages/graphic/compute/graphic3d/GraphicFaceComput2.ts b/packages/graphic/compute/graphic3d/GraphicFaceComput2.ts index 31a9191e..b9e776ad 100644 --- a/packages/graphic/compute/graphic3d/GraphicFaceComput2.ts +++ b/packages/graphic/compute/graphic3d/GraphicFaceComput2.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let graphicFaceCompute2 = (segmentCode: number) => { let code = /*wgsl*/` #include "GlobalUniform" diff --git a/packages/graphic/compute/graphic3d/GraphicFaceCompute.ts b/packages/graphic/compute/graphic3d/GraphicFaceCompute.ts index 721bdc00..dab00e65 100644 --- a/packages/graphic/compute/graphic3d/GraphicFaceCompute.ts +++ b/packages/graphic/compute/graphic3d/GraphicFaceCompute.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let graphicFaceCompute = (segmentCode: number) => { let code = /*wgsl*/` #include "GlobalUniform" diff --git a/packages/graphic/compute/graphic3d/GraphicFaceCompute3.ts b/packages/graphic/compute/graphic3d/GraphicFaceCompute3.ts index 04de8d71..4148b7ce 100644 --- a/packages/graphic/compute/graphic3d/GraphicFaceCompute3.ts +++ b/packages/graphic/compute/graphic3d/GraphicFaceCompute3.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GraphicFaceCompute3 = (segmentCode: number) => { let code = /*wgsl*/` #include "GlobalUniform" diff --git a/packages/graphic/compute/graphic3d/GraphicLineCompute.ts b/packages/graphic/compute/graphic3d/GraphicLineCompute.ts index 906852ae..252534e5 100644 --- a/packages/graphic/compute/graphic3d/GraphicLineCompute.ts +++ b/packages/graphic/compute/graphic3d/GraphicLineCompute.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GraphicLineCompute = () => { let code = /*wgsl*/` #include "GlobalUniform" diff --git a/packages/graphic/compute/graphic3d/GraphicTrailCompute.ts b/packages/graphic/compute/graphic3d/GraphicTrailCompute.ts index 4bb75805..68b76a03 100644 --- a/packages/graphic/compute/graphic3d/GraphicTrailCompute.ts +++ b/packages/graphic/compute/graphic3d/GraphicTrailCompute.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let graphicTrailCompute = (segmentCode: number) => { let code = /*wgsl*/` #include "GlobalUniform" diff --git a/packages/graphic/compute/graphic3d/GraphicTrailCompute2.ts b/packages/graphic/compute/graphic3d/GraphicTrailCompute2.ts index 51b0e321..77f1cdbc 100644 --- a/packages/graphic/compute/graphic3d/GraphicTrailCompute2.ts +++ b/packages/graphic/compute/graphic3d/GraphicTrailCompute2.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GraphicTrailCompute2 = (segmentCode: number) => { let code = /*wgsl*/` #include "GlobalUniform" diff --git a/packages/graphic/compute/grass/GrassAnimCompute_cs.ts b/packages/graphic/compute/grass/GrassAnimCompute_cs.ts index de13330a..26f89fa8 100644 --- a/packages/graphic/compute/grass/GrassAnimCompute_cs.ts +++ b/packages/graphic/compute/grass/GrassAnimCompute_cs.ts @@ -1,2 +1,5 @@ +/** + * @internal + */ export let GrassAnimCompute_cs = /*wgsl*/` ` \ No newline at end of file diff --git a/packages/graphic/compute/grass/GrassGeometryCompute_cs.ts b/packages/graphic/compute/grass/GrassGeometryCompute_cs.ts index 167f8655..d923d49e 100644 --- a/packages/graphic/compute/grass/GrassGeometryCompute_cs.ts +++ b/packages/graphic/compute/grass/GrassGeometryCompute_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GrassGeometryCompute_cs = /*wgsl*/` struct GrassNode { grassCount: f32, diff --git a/packages/graphic/compute/shape3d/CircleShape3DCode_cs.ts b/packages/graphic/compute/shape3d/CircleShape3DCode_cs.ts index b1057974..e5ed6136 100644 --- a/packages/graphic/compute/shape3d/CircleShape3DCode_cs.ts +++ b/packages/graphic/compute/shape3d/CircleShape3DCode_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let CircleShape3DCode_cs = /*wgsl*/` struct CircleShape3D { diff --git a/packages/graphic/compute/shape3d/EllipseShape3DCode_cs.ts b/packages/graphic/compute/shape3d/EllipseShape3DCode_cs.ts index 3df69afe..d28b543f 100644 --- a/packages/graphic/compute/shape3d/EllipseShape3DCode_cs.ts +++ b/packages/graphic/compute/shape3d/EllipseShape3DCode_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let EllipseShape3DCode_cs = /*wgsl*/` struct EllipseShape3D { diff --git a/packages/graphic/compute/shape3d/Path2DShape3DCode_cs.ts b/packages/graphic/compute/shape3d/Path2DShape3DCode_cs.ts index 197b5039..85c240a0 100644 --- a/packages/graphic/compute/shape3d/Path2DShape3DCode_cs.ts +++ b/packages/graphic/compute/shape3d/Path2DShape3DCode_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Path2DShape3DCode_cs = /*wgsl*/` struct Path2DShape3D { diff --git a/packages/graphic/compute/shape3d/Path3DShape3DCode_cs.ts b/packages/graphic/compute/shape3d/Path3DShape3DCode_cs.ts index c75bbd82..948b8f9c 100644 --- a/packages/graphic/compute/shape3d/Path3DShape3DCode_cs.ts +++ b/packages/graphic/compute/shape3d/Path3DShape3DCode_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Path3DShape3DCode_cs = /*wgsl*/` struct Path3DShape3D { diff --git a/packages/graphic/compute/shape3d/RoundRectShape3DCode_cs.ts b/packages/graphic/compute/shape3d/RoundRectShape3DCode_cs.ts index 3b65095f..c287f9d9 100644 --- a/packages/graphic/compute/shape3d/RoundRectShape3DCode_cs.ts +++ b/packages/graphic/compute/shape3d/RoundRectShape3DCode_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let RoundRectShape3DCode_cs = /*wgsl*/` struct RoundRectShape3D { diff --git a/packages/graphic/compute/shape3d/Shape3DCommonCode_cs.ts b/packages/graphic/compute/shape3d/Shape3DCommonCode_cs.ts index 1bb6ce90..d4d55f61 100644 --- a/packages/graphic/compute/shape3d/Shape3DCommonCode_cs.ts +++ b/packages/graphic/compute/shape3d/Shape3DCommonCode_cs.ts @@ -4,6 +4,9 @@ import { Path2DShape3DCode_cs } from "./Path2DShape3DCode_cs"; import { Path3DShape3DCode_cs } from "./Path3DShape3DCode_cs"; import { RoundRectShape3DCode_cs } from "./RoundRectShape3DCode_cs"; +/** + * @internal + */ export let Shape3DCommonCode_cs = /*wgsl*/` ${CircleShape3DCode_cs} diff --git a/packages/graphic/compute/shape3d/Shape3DKeyPointCompute_cs.ts b/packages/graphic/compute/shape3d/Shape3DKeyPointCompute_cs.ts index 8275318c..dc25ef63 100644 --- a/packages/graphic/compute/shape3d/Shape3DKeyPointCompute_cs.ts +++ b/packages/graphic/compute/shape3d/Shape3DKeyPointCompute_cs.ts @@ -1,5 +1,8 @@ import { Shape3DCommonCode_cs } from "./Shape3DCommonCode_cs"; +/** + * @internal + */ export let Shape3DKeyPointCompute_cs = /*wgsl*/` ${Shape3DCommonCode_cs} diff --git a/packages/graphic/compute/shape3d/Shape3DVertexCompute_cs.ts b/packages/graphic/compute/shape3d/Shape3DVertexCompute_cs.ts index 3ce96b5c..d5ba0509 100644 --- a/packages/graphic/compute/shape3d/Shape3DVertexCompute_cs.ts +++ b/packages/graphic/compute/shape3d/Shape3DVertexCompute_cs.ts @@ -1,5 +1,8 @@ import { Shape3DCommonCode_cs } from "./Shape3DCommonCode_cs"; +/** + * @internal + */ export let Shape3DVertexCompute_cs = /*wgsl*/` ${Shape3DCommonCode_cs} diff --git a/packages/graphic/compute/shape3d/Shape3DVertexFillZero_cs.ts b/packages/graphic/compute/shape3d/Shape3DVertexFillZero_cs.ts index 0085a7f4..52eb5ea3 100644 --- a/packages/graphic/compute/shape3d/Shape3DVertexFillZero_cs.ts +++ b/packages/graphic/compute/shape3d/Shape3DVertexFillZero_cs.ts @@ -1,5 +1,8 @@ import { Shape3DCommonCode_cs } from "./Shape3DCommonCode_cs"; +/** + * @internal + */ export let Shape3DVertexFillZero_cs = /*wgsl*/` ${Shape3DCommonCode_cs} diff --git a/packages/media-extention/ChromaKeyShader.ts b/packages/media-extention/ChromaKeyShader.ts index dcf5a9fa..2e7db320 100644 --- a/packages/media-extention/ChromaKeyShader.ts +++ b/packages/media-extention/ChromaKeyShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ChromaKeyShader = /*wgsl*/` #include "Common_vert" #include "Common_frag" diff --git a/packages/media-extention/VideoShader.ts b/packages/media-extention/VideoShader.ts index ed8d6cc5..0171b270 100644 --- a/packages/media-extention/VideoShader.ts +++ b/packages/media-extention/VideoShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let VideoShader = /*wgsl*/` #include "Common_vert" #include "Common_frag" diff --git a/packages/particle/shader/ParticleRenderShader.ts b/packages/particle/shader/ParticleRenderShader.ts index eddfd362..f2bbc338 100644 --- a/packages/particle/shader/ParticleRenderShader.ts +++ b/packages/particle/shader/ParticleRenderShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ParticleRenderShader = /* wgsl */ ` #include "Common_vert" #include "Common_frag" diff --git a/packages/particle/shader/Particle_Mass_UnLight_shader.ts b/packages/particle/shader/Particle_Mass_UnLight_shader.ts index 12a41c2e..781f42fe 100644 --- a/packages/particle/shader/Particle_Mass_UnLight_shader.ts +++ b/packages/particle/shader/Particle_Mass_UnLight_shader.ts @@ -101,6 +101,7 @@ fn main( return VertexOutput(Vertex_Uv ,vWorldPos.xyz,vWorldNormal, position ); } `; + /** * @internal */ diff --git a/packages/particle/shader/compute_density_pressure_compute.ts b/packages/particle/shader/compute_density_pressure_compute.ts index 8ae509fd..b96c0bf1 100644 --- a/packages/particle/shader/compute_density_pressure_compute.ts +++ b/packages/particle/shader/compute_density_pressure_compute.ts @@ -1,4 +1,5 @@ import { FastMath_shader } from './FastMath'; + /** * @internal */ diff --git a/packages/physics/Physics.ts b/packages/physics/Physics.ts index 95c714f7..115310f4 100644 --- a/packages/physics/Physics.ts +++ b/packages/physics/Physics.ts @@ -169,5 +169,8 @@ class _Physics { * ``` * @group Plugin */ +/** + * @internal + */ export let Physics = new _Physics(); export {Ammo} diff --git a/src/assets/shader/anim/SkeletonAnimation_shader.ts b/src/assets/shader/anim/SkeletonAnimation_shader.ts index 0ca8faa5..c210e427 100644 --- a/src/assets/shader/anim/SkeletonAnimation_shader.ts +++ b/src/assets/shader/anim/SkeletonAnimation_shader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export class SkeletonAnimation_shader { public static groupBindingAndFunctions(beginGroup: number, beginBinding: number) { return /* wgsl */ ` diff --git a/src/assets/shader/cluster/ClusterBoundsSource_cs.ts b/src/assets/shader/cluster/ClusterBoundsSource_cs.ts index da7e0cca..e634bf09 100644 --- a/src/assets/shader/cluster/ClusterBoundsSource_cs.ts +++ b/src/assets/shader/cluster/ClusterBoundsSource_cs.ts @@ -1,5 +1,8 @@ import { ClusterConfig } from "../../../gfx/renderJob/passRenderer/cluster/ClusterConfig"; +/** + * @internal + */ export let ClusterBoundsSource_cs: string = /* wgsl */` #include "GlobalUniform" diff --git a/src/assets/shader/cluster/ClusterLighting_cs.ts b/src/assets/shader/cluster/ClusterLighting_cs.ts index 5b1ef22a..af3fef1f 100644 --- a/src/assets/shader/cluster/ClusterLighting_cs.ts +++ b/src/assets/shader/cluster/ClusterLighting_cs.ts @@ -1,5 +1,8 @@ import { ClusterConfig } from "../../../gfx/renderJob/passRenderer/cluster/ClusterConfig"; +/** + * @internal + */ export let ClusterLighting_cs: string = /*wgsl*/` #include "GlobalUniform" diff --git a/src/assets/shader/compute/BLUR_CsShader.ts b/src/assets/shader/compute/BLUR_CsShader.ts index 072dd06e..d69bdcc0 100644 --- a/src/assets/shader/compute/BLUR_CsShader.ts +++ b/src/assets/shader/compute/BLUR_CsShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let BLUR_CsShader: string = /* wgsl */` #include "GlobalUniform" diff --git a/src/assets/shader/compute/BRDFLUT.ts b/src/assets/shader/compute/BRDFLUT.ts index e40760bc..e15faa66 100644 --- a/src/assets/shader/compute/BRDFLUT.ts +++ b/src/assets/shader/compute/BRDFLUT.ts @@ -1,4 +1,6 @@ - +/** + * @internal + */ export let BRDFLUT: string = /*wgsl*/ ` varPI: f32 = 3.141592653589793; diff --git a/src/assets/shader/compute/BloomEffect_cs.ts b/src/assets/shader/compute/BloomEffect_cs.ts index f42aa013..f26eb34e 100644 --- a/src/assets/shader/compute/BloomEffect_cs.ts +++ b/src/assets/shader/compute/BloomEffect_cs.ts @@ -1,5 +1,7 @@ import { ColorUtil } from "../utils/ColorUtil"; - +/** + * @internal + */ let BloomCfg = /*wgsl*/ ` struct BloomCfg{ downSampleStep: f32, @@ -25,7 +27,9 @@ let CalcUV_01 = /*wgsl*/ ` ` //_______________calc weight - +/** + * @internal + */ let GaussWeight2D: string = /*wgsl*/ ` fn GaussWeight2D(x:f32, y:f32, sigma:f32) -> f32 { @@ -37,11 +41,12 @@ fn GaussWeight2D(x:f32, y:f32, sigma:f32) -> f32 return pow(E, a) / (2.0 * PI * sigma_2); } ` - +/** + * @internal + */ let GaussBlur = function (GaussNxN: string, inTex: string, inTexSampler: string) { var code: string = /*wgsl*/ ` - - + fn ${GaussNxN}(uv:vec2, n:i32, stride:vec2, sigma:f32) -> vec3 { var color = vec3(0.0); @@ -69,7 +74,9 @@ let GaussBlur = function (GaussNxN: string, inTex: string, inTexSampler: string) //________________________pixel filter - +/** + * @internal + */ export let threshold: string = /*wgsl*/ ` ${ColorUtil} ${BloomCfg} @@ -105,7 +112,9 @@ fn CsMain( @builtin(workgroup_id) workgroup_id : vec3 , @builtin(global_inv ` //________________________down sample - +/** + * @internal + */ export let downSample: string = /*wgsl*/ ` ${BloomCfg} @@ -139,6 +148,9 @@ fn CsMain( @builtin(workgroup_id) workgroup_id : vec3 , @builtin(global_inv //__________________________up sample +/** + * @internal + */ export let upSample = /*wgsl*/ ` ${BloomCfg} @@ -180,6 +192,9 @@ fn CsMain( @builtin(workgroup_id) workgroup_id : vec3 , @builtin(global_inv //__________________________blend +/** + * @internal + */ export let post = /*wgsl*/ ` ${ColorUtil} ${BloomCfg} diff --git a/src/assets/shader/compute/BlurEffectCreator_cs.ts b/src/assets/shader/compute/BlurEffectCreator_cs.ts index def9c40d..f47c8275 100644 --- a/src/assets/shader/compute/BlurEffectCreator_cs.ts +++ b/src/assets/shader/compute/BlurEffectCreator_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let BlurEffectCreatorSample_cs: string = /*wgsl*/ ` struct ImageSize { srcWidth: i32, @@ -20,6 +23,9 @@ export let BlurEffectCreatorSample_cs: string = /*wgsl*/ ` } ` +/** + * @internal + */ export let BlurEffectCreatorBlur_cs: string = /*wgsl*/ ` struct ImageSize { srcWidth: i32, diff --git a/src/assets/shader/compute/DDGIIrradiance_Cs.ts b/src/assets/shader/compute/DDGIIrradiance_Cs.ts index ae97f6c1..4b37e8ac 100644 --- a/src/assets/shader/compute/DDGIIrradiance_Cs.ts +++ b/src/assets/shader/compute/DDGIIrradiance_Cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let DDGIIrradiance_shader = /*wgsl*/` #include "GenerayRandomDir" #include "MathShader" diff --git a/src/assets/shader/compute/DDGILighting_CSShader.ts b/src/assets/shader/compute/DDGILighting_CSShader.ts index 06864683..1d6593aa 100644 --- a/src/assets/shader/compute/DDGILighting_CSShader.ts +++ b/src/assets/shader/compute/DDGILighting_CSShader.ts @@ -1,5 +1,8 @@ import { CSM } from "../../../core/csm/CSM"; +/** + * @internal + */ export let DDGILighting_shader = /*wgsl*/` var PI: f32 = 3.14159265359; diff --git a/src/assets/shader/compute/DepthOfView_cs.ts b/src/assets/shader/compute/DepthOfView_cs.ts index e663bb31..bbe7d04c 100644 --- a/src/assets/shader/compute/DepthOfView_cs.ts +++ b/src/assets/shader/compute/DepthOfView_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let DepthOfView_cs: string = /*wgsl*/ ` #include "GlobalUniform" #include "GBufferStand" diff --git a/src/assets/shader/compute/ErpImage2CubeMapCreateCube_cs.ts b/src/assets/shader/compute/ErpImage2CubeMapCreateCube_cs.ts index d08b2e01..e66fc946 100644 --- a/src/assets/shader/compute/ErpImage2CubeMapCreateCube_cs.ts +++ b/src/assets/shader/compute/ErpImage2CubeMapCreateCube_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ErpImage2CubeMapCreateCube_cs: string = /*wgsl*/ ` struct ImageSize { srcWidth : i32, diff --git a/src/assets/shader/compute/ErpImage2CubeMapRgbe2rgba_cs.ts b/src/assets/shader/compute/ErpImage2CubeMapRgbe2rgba_cs.ts index 4c6f676f..571a58e2 100644 --- a/src/assets/shader/compute/ErpImage2CubeMapRgbe2rgba_cs.ts +++ b/src/assets/shader/compute/ErpImage2CubeMapRgbe2rgba_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ErpImage2CubeMapRgbe2rgba_cs: string = /*wgsl*/ ` struct ImageSize { srcWidth : i32, diff --git a/src/assets/shader/compute/GTAO_cs.ts b/src/assets/shader/compute/GTAO_cs.ts index a3b7f883..879f5261 100644 --- a/src/assets/shader/compute/GTAO_cs.ts +++ b/src/assets/shader/compute/GTAO_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GTAO_cs: string = /*wgsl*/ ` #include "GlobalUniform" #include "GBufferStand" diff --git a/src/assets/shader/compute/GodRay_cs.ts b/src/assets/shader/compute/GodRay_cs.ts index 68b8ef8f..60295f0e 100644 --- a/src/assets/shader/compute/GodRay_cs.ts +++ b/src/assets/shader/compute/GodRay_cs.ts @@ -1,5 +1,8 @@ import { CSM } from "../../../core/csm/CSM"; +/** + * @internal + */ export let GodRay_cs: string = /*wgsl*/ ` #include "GlobalUniform" diff --git a/src/assets/shader/compute/IBLEnvMapCreator_cs.ts b/src/assets/shader/compute/IBLEnvMapCreator_cs.ts index d8618870..4cbbeced 100644 --- a/src/assets/shader/compute/IBLEnvMapCreator_cs.ts +++ b/src/assets/shader/compute/IBLEnvMapCreator_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let IBLEnvMapCreator_cs: string = /*wgsl*/ ` struct ImageSize { srcWidth : i32, diff --git a/src/assets/shader/compute/MergeRGBA_cs.ts b/src/assets/shader/compute/MergeRGBA_cs.ts index 023389af..30745ede 100644 --- a/src/assets/shader/compute/MergeRGBA_cs.ts +++ b/src/assets/shader/compute/MergeRGBA_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let MergeRGBA_cs: string = /*wgsl*/ ` @group(0) @binding(0) var textureR : texture_2d; @group(0) @binding(1) var textureG : texture_2d; diff --git a/src/assets/shader/compute/MultiBouncePass_cs.ts b/src/assets/shader/compute/MultiBouncePass_cs.ts index bf44b2db..d2eace02 100644 --- a/src/assets/shader/compute/MultiBouncePass_cs.ts +++ b/src/assets/shader/compute/MultiBouncePass_cs.ts @@ -1,4 +1,6 @@ - +/** + * @internal + */ export let MultiBouncePass_cs: string = /*wgsl*/ ` #include "MathShader" #include "IrradianceVolumeData_frag" diff --git a/src/assets/shader/compute/OutLineBlendColor_cs.ts b/src/assets/shader/compute/OutLineBlendColor_cs.ts index 4661a55d..09ed30e1 100644 --- a/src/assets/shader/compute/OutLineBlendColor_cs.ts +++ b/src/assets/shader/compute/OutLineBlendColor_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let OutLineBlendColor_cs: string = /*wgsl*/ ` struct OutlineSettingData{ strength: f32, diff --git a/src/assets/shader/compute/OutlineCalcOutline_cs.ts b/src/assets/shader/compute/OutlineCalcOutline_cs.ts index 74979c42..a04f3f39 100644 --- a/src/assets/shader/compute/OutlineCalcOutline_cs.ts +++ b/src/assets/shader/compute/OutlineCalcOutline_cs.ts @@ -1,4 +1,6 @@ - +/** + * @internal + */ export let OutlineCalcOutline_cs: string = /*wgsl*/ ` #include "GlobalUniform" #include "GBufferStand" diff --git a/src/assets/shader/compute/Outline_cs.ts b/src/assets/shader/compute/Outline_cs.ts index e74b83a7..e9c9a978 100644 --- a/src/assets/shader/compute/Outline_cs.ts +++ b/src/assets/shader/compute/Outline_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Outline_cs: string = /*wgsl*/ ` struct OutlineSettingData{ strength: f32, diff --git a/src/assets/shader/compute/Picker_cs.ts b/src/assets/shader/compute/Picker_cs.ts index f746fe1d..c8f2feea 100644 --- a/src/assets/shader/compute/Picker_cs.ts +++ b/src/assets/shader/compute/Picker_cs.ts @@ -1,4 +1,6 @@ - +/** + * @internal + */ export let Picker_cs: string = /*wgsl*/ ` #include "GlobalUniform" diff --git a/src/assets/shader/compute/PreFilteredEnvironment_cs copy.ts b/src/assets/shader/compute/PreFilteredEnvironment_cs copy.ts index f311bf50..3cd4dc0b 100644 --- a/src/assets/shader/compute/PreFilteredEnvironment_cs copy.ts +++ b/src/assets/shader/compute/PreFilteredEnvironment_cs copy.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let PreFilteredEnvironment_cs2: string = /*wgsl*/ ` // input reflection buffer texture // sample prefiltered cube uv texture diff --git a/src/assets/shader/compute/PreFilteredEnvironment_cs.ts b/src/assets/shader/compute/PreFilteredEnvironment_cs.ts index dcae65a8..c1a276d7 100644 --- a/src/assets/shader/compute/PreFilteredEnvironment_cs.ts +++ b/src/assets/shader/compute/PreFilteredEnvironment_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let PreFilteredEnvironment_cs: string = /*wgsl*/ ` // input reflection buffer texture // sample prefiltered cube uv texture diff --git a/src/assets/shader/compute/PreIntegratedLut.ts b/src/assets/shader/compute/PreIntegratedLut.ts index e3676e29..5aee9872 100644 --- a/src/assets/shader/compute/PreIntegratedLut.ts +++ b/src/assets/shader/compute/PreIntegratedLut.ts @@ -1,4 +1,6 @@ - +/** + * @internal + */ export let PreIntegratedLut: string = /*wgsl*/ ` varPI: f32 = 3.141592653589793; diff --git a/src/assets/shader/compute/SSAO_cs.ts b/src/assets/shader/compute/SSAO_cs.ts index 60864622..6e719311 100644 --- a/src/assets/shader/compute/SSAO_cs.ts +++ b/src/assets/shader/compute/SSAO_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let SSAO_cs: string = /*wgsl*/ ` #include "GlobalUniform" struct UniformData { diff --git a/src/assets/shader/compute/SSGI2_cs.ts b/src/assets/shader/compute/SSGI2_cs.ts index 13d1fe46..bb2953fb 100644 --- a/src/assets/shader/compute/SSGI2_cs.ts +++ b/src/assets/shader/compute/SSGI2_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let SSGI2_cs: string = /*wgsl*/ ` #include "GlobalUniform" #include "MathShader" diff --git a/src/assets/shader/compute/SSR_BlendColor_cs.ts b/src/assets/shader/compute/SSR_BlendColor_cs.ts index c10d8117..392c2d5f 100644 --- a/src/assets/shader/compute/SSR_BlendColor_cs.ts +++ b/src/assets/shader/compute/SSR_BlendColor_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let SSR_BlendColor_cs: string = /*wgsl*/ ` #include 'GlobalUniform' diff --git a/src/assets/shader/compute/SSR_IS_cs.ts b/src/assets/shader/compute/SSR_IS_cs.ts index 10422eb5..dff18e49 100644 --- a/src/assets/shader/compute/SSR_IS_cs.ts +++ b/src/assets/shader/compute/SSR_IS_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let SSR_IS_cs: string = /*wgsl*/ ` #include 'BitUtil' diff --git a/src/assets/shader/compute/SSR_RayTrace_cs.ts b/src/assets/shader/compute/SSR_RayTrace_cs.ts index 742e865e..c7f0781f 100644 --- a/src/assets/shader/compute/SSR_RayTrace_cs.ts +++ b/src/assets/shader/compute/SSR_RayTrace_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let SSR_RayTrace_cs: string = /*wgsl*/ ` #include "GlobalUniform" #include "MathShader" diff --git a/src/assets/shader/compute/TAACopyTex_cs.ts b/src/assets/shader/compute/TAACopyTex_cs.ts index 913135b7..7f2e96cf 100644 --- a/src/assets/shader/compute/TAACopyTex_cs.ts +++ b/src/assets/shader/compute/TAACopyTex_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let TAACopyTex_cs: string = /*wgsl*/ ` @group(0) @binding(0) var preColor : array>; @group(0) @binding(1) var preColorTex : texture_storage_2d; diff --git a/src/assets/shader/compute/TAASharpTex_cs.ts b/src/assets/shader/compute/TAASharpTex_cs.ts index a9a797b8..06debe74 100644 --- a/src/assets/shader/compute/TAASharpTex_cs.ts +++ b/src/assets/shader/compute/TAASharpTex_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let TAASharpTex_cs: string = /*wgsl*/ ` struct TAAData{ preProjMatrix: mat4x4, diff --git a/src/assets/shader/compute/TAA_cs.ts b/src/assets/shader/compute/TAA_cs.ts index 19dd04e3..dffe4993 100644 --- a/src/assets/shader/compute/TAA_cs.ts +++ b/src/assets/shader/compute/TAA_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let TAA_cs: string = /*wgsl*/ ` #include "GlobalUniform" #include "GBufferStand" diff --git a/src/assets/shader/compute/utils/Combine_cs.ts b/src/assets/shader/compute/utils/Combine_cs.ts index 2fc71ac8..4684b032 100644 --- a/src/assets/shader/compute/utils/Combine_cs.ts +++ b/src/assets/shader/compute/utils/Combine_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Combine_cs = /* wgsl */` #include "GlobalUniform" #include "BitUtil" diff --git a/src/assets/shader/compute/utils/Denoising_cs.ts b/src/assets/shader/compute/utils/Denoising_cs.ts index d43d49ed..ee97d213 100644 --- a/src/assets/shader/compute/utils/Denoising_cs.ts +++ b/src/assets/shader/compute/utils/Denoising_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Denoising_cs = /* wgsl */` // #include "GlobalUniform" diff --git a/src/assets/shader/compute/utils/TestComputeLoadBuffer.ts b/src/assets/shader/compute/utils/TestComputeLoadBuffer.ts index 84a2a323..9e178290 100644 --- a/src/assets/shader/compute/utils/TestComputeLoadBuffer.ts +++ b/src/assets/shader/compute/utils/TestComputeLoadBuffer.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let TestComputeLoadBuffer = /* wgsl */` #include "GlobalUniform" #include "MathShader" diff --git a/src/assets/shader/compute/utils/tw.ts b/src/assets/shader/compute/utils/tw.ts index 9981b845..423d2542 100644 --- a/src/assets/shader/compute/utils/tw.ts +++ b/src/assets/shader/compute/utils/tw.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let tw = /* wgsl */` @group(0) @binding(1) var inputTexture : texture_2d; diff --git a/src/assets/shader/core/base/Common_frag.ts b/src/assets/shader/core/base/Common_frag.ts index 8b7c5e87..b65957e2 100644 --- a/src/assets/shader/core/base/Common_frag.ts +++ b/src/assets/shader/core/base/Common_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Common_frag: string = /*wgsl*/ ` #include "GlobalUniform" #include "FragmentVarying" diff --git a/src/assets/shader/core/base/Common_vert.ts b/src/assets/shader/core/base/Common_vert.ts index e456d252..bca64ece 100644 --- a/src/assets/shader/core/base/Common_vert.ts +++ b/src/assets/shader/core/base/Common_vert.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Common_vert: string = /*wgsl*/ ` #include "WorldMatrixUniform" #include "VertexAttributes_vert" diff --git a/src/assets/shader/core/common/BrdfLut_frag.ts b/src/assets/shader/core/common/BrdfLut_frag.ts index 392920ce..2aca59bb 100644 --- a/src/assets/shader/core/common/BrdfLut_frag.ts +++ b/src/assets/shader/core/common/BrdfLut_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let BrdfLut_frag: string = /*wgsl*/ ` @group(1) @binding(auto) var brdflutMapSampler: sampler; diff --git a/src/assets/shader/core/common/EnvMap_frag.ts b/src/assets/shader/core/common/EnvMap_frag.ts index aa4e0067..6ae9749e 100644 --- a/src/assets/shader/core/common/EnvMap_frag.ts +++ b/src/assets/shader/core/common/EnvMap_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let EnvMap_frag: string = /*wgsl*/ ` @group(1) @binding(auto) var prefilterMapSampler: sampler; diff --git a/src/assets/shader/core/common/GBufferStand.ts b/src/assets/shader/core/common/GBufferStand.ts index df1e83a2..953574cf 100644 --- a/src/assets/shader/core/common/GBufferStand.ts +++ b/src/assets/shader/core/common/GBufferStand.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GBufferStand = /* wgsl */ ` #include "MathShader" #include "FastMathShader" diff --git a/src/assets/shader/core/common/GlobalUniform.ts b/src/assets/shader/core/common/GlobalUniform.ts index 59cd7748..d2b25a94 100644 --- a/src/assets/shader/core/common/GlobalUniform.ts +++ b/src/assets/shader/core/common/GlobalUniform.ts @@ -1,5 +1,8 @@ import { CSM } from "../../../../core/csm/CSM"; +/** + * @internal + */ export let GlobalUniform: string = /*wgsl*/ ` #include "MathShader" diff --git a/src/assets/shader/core/common/InstanceUniform.ts b/src/assets/shader/core/common/InstanceUniform.ts index d5c876e8..4c756843 100644 --- a/src/assets/shader/core/common/InstanceUniform.ts +++ b/src/assets/shader/core/common/InstanceUniform.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let InstanceUniform: string = /*wgsl*/ ` #if USE_INSTANCEDRAW struct InstanceUniform { diff --git a/src/assets/shader/core/common/SHCommon_frag.ts b/src/assets/shader/core/common/SHCommon_frag.ts index 4062e68e..60d8c3e9 100644 --- a/src/assets/shader/core/common/SHCommon_frag.ts +++ b/src/assets/shader/core/common/SHCommon_frag.ts @@ -1,4 +1,6 @@ - +/** + * @internal + */ export let SHCommon_frag: string = /*wgsl*/ ` fn Y0(v : vec3f ) -> f32 { diff --git a/src/assets/shader/core/common/WorldMatrixUniform.ts b/src/assets/shader/core/common/WorldMatrixUniform.ts index 12368208..36914c55 100644 --- a/src/assets/shader/core/common/WorldMatrixUniform.ts +++ b/src/assets/shader/core/common/WorldMatrixUniform.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let WorldMatrixUniform: string = /*wgsl*/ ` struct Uniforms { matrix : array> diff --git a/src/assets/shader/core/inline/Inline_vert.ts b/src/assets/shader/core/inline/Inline_vert.ts index 9ccf7d91..87fd714f 100644 --- a/src/assets/shader/core/inline/Inline_vert.ts +++ b/src/assets/shader/core/inline/Inline_vert.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Inline_vert: string = /*wgsl*/ ` #include "MathShader" #include "FastMathShader" diff --git a/src/assets/shader/core/pass/CastShadow_pass.ts b/src/assets/shader/core/pass/CastShadow_pass.ts index 71822271..6b9a31c2 100644 --- a/src/assets/shader/core/pass/CastShadow_pass.ts +++ b/src/assets/shader/core/pass/CastShadow_pass.ts @@ -1,5 +1,9 @@ import { SkeletonAnimation_shader } from "../../anim/SkeletonAnimation_shader"; import { MorphTarget_shader } from "../../../../components/anim/morphAnim/MorphTarget_shader"; + +/** + * @internal + */ export let shadowCastMap_vert: string = /*wgsl*/ ` #include "WorldMatrixUniform" #include "GlobalUniform" @@ -109,6 +113,9 @@ fn main(vertex:VertexAttributes) -> VertexOutput { } ` +/** + * @internal + */ export let castPointShadowMap_vert: string = /*wgsl*/ ` #include "WorldMatrixUniform" #include "GlobalUniform" @@ -219,6 +226,9 @@ fn main(vertex:VertexAttributes) -> VertexOutput { } ` +/** + * @internal + */ export let shadowCastMap_frag: string = /*wgsl*/ ` #if USE_ALPHACUT @group(1) @binding(0) @@ -259,6 +269,9 @@ export let shadowCastMap_frag: string = /*wgsl*/ ` } ` +/** + * @internal + */ export let directionShadowCastMap_frag: string = /*wgsl*/ ` #if USE_ALPHACUT @group(1) @binding(0) diff --git a/src/assets/shader/core/pass/FrustumCulling_cs.ts b/src/assets/shader/core/pass/FrustumCulling_cs.ts index dd32c4df..9ffffa8c 100644 --- a/src/assets/shader/core/pass/FrustumCulling_cs.ts +++ b/src/assets/shader/core/pass/FrustumCulling_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let FrustumCulling_cs: string = /*wgsl*/ ` #include "GlobalUniform" diff --git a/src/assets/shader/core/pass/GBuffer_pass.ts b/src/assets/shader/core/pass/GBuffer_pass.ts index 5b2eb1ab..ae0843c6 100644 --- a/src/assets/shader/core/pass/GBuffer_pass.ts +++ b/src/assets/shader/core/pass/GBuffer_pass.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GBuffer_pass: string = /*wgsl*/ ` #include "Common_vert" #include "FragmentVarying" diff --git a/src/assets/shader/core/pass/SkyGBuffer_pass.ts b/src/assets/shader/core/pass/SkyGBuffer_pass.ts index 01031709..313d400d 100644 --- a/src/assets/shader/core/pass/SkyGBuffer_pass.ts +++ b/src/assets/shader/core/pass/SkyGBuffer_pass.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let SkyGBuffer_pass: string = /*wgsl*/ ` #include "GlobalUniform" #include "ColorUtil_frag" diff --git a/src/assets/shader/core/pass/ZPassShader_cs.ts b/src/assets/shader/core/pass/ZPassShader_cs.ts index 25de3885..9155dac5 100644 --- a/src/assets/shader/core/pass/ZPassShader_cs.ts +++ b/src/assets/shader/core/pass/ZPassShader_cs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ZPassShader_cs: string = /*wgsl*/ ` @group(0) @binding(0) var visibleBuffer: array; @group(0) @binding(1) var zBufferTexture : texture_2d; diff --git a/src/assets/shader/core/pass/ZPassShader_fs.ts b/src/assets/shader/core/pass/ZPassShader_fs.ts index d441a8d7..340bce95 100644 --- a/src/assets/shader/core/pass/ZPassShader_fs.ts +++ b/src/assets/shader/core/pass/ZPassShader_fs.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ZPassShader_fs: string = /*wgsl*/ ` #include "GlobalUniform" #include "MathShader" diff --git a/src/assets/shader/core/pass/ZPassShader_vs.ts b/src/assets/shader/core/pass/ZPassShader_vs.ts index 6a6ddd86..fa22cb23 100644 --- a/src/assets/shader/core/pass/ZPassShader_vs.ts +++ b/src/assets/shader/core/pass/ZPassShader_vs.ts @@ -1,6 +1,9 @@ import { MorphTarget_shader } from "../../../../components/anim/morphAnim/MorphTarget_shader"; import { SkeletonAnimation_shader } from "../../anim/SkeletonAnimation_shader"; +/** + * @internal + */ export let ZPassShader_vs: string = /*wgsl*/ ` #include "GlobalUniform" #include "MathShader" diff --git a/src/assets/shader/core/struct/ClusterLight.ts b/src/assets/shader/core/struct/ClusterLight.ts index 09741bbc..105933b9 100644 --- a/src/assets/shader/core/struct/ClusterLight.ts +++ b/src/assets/shader/core/struct/ClusterLight.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ClusterLight: string = /*wgsl*/ ` struct LightData { index:f32, diff --git a/src/assets/shader/core/struct/ColorPassFragmentOutput.ts b/src/assets/shader/core/struct/ColorPassFragmentOutput.ts index a8fb31b4..a8bb54a3 100644 --- a/src/assets/shader/core/struct/ColorPassFragmentOutput.ts +++ b/src/assets/shader/core/struct/ColorPassFragmentOutput.ts @@ -1,5 +1,6 @@ - - +/** + * @internal + */ export let ColorPassFragmentOutput: string = /*wgsl*/ ` struct FragmentOutput { @location(auto) color: vec4, diff --git a/src/assets/shader/core/struct/FragmentOutput.ts b/src/assets/shader/core/struct/FragmentOutput.ts index 137683e8..2ded8886 100644 --- a/src/assets/shader/core/struct/FragmentOutput.ts +++ b/src/assets/shader/core/struct/FragmentOutput.ts @@ -1,5 +1,6 @@ - - +/** + * @internal + */ export let FragmentOutput: string = /*wgsl*/ ` #if USE_CASTREFLECTION struct FragmentOutput { diff --git a/src/assets/shader/core/struct/FragmentVarying.ts b/src/assets/shader/core/struct/FragmentVarying.ts index 491235e2..a36a7f87 100644 --- a/src/assets/shader/core/struct/FragmentVarying.ts +++ b/src/assets/shader/core/struct/FragmentVarying.ts @@ -1,4 +1,6 @@ - +/** + * @internal + */ export let FragmentVarying: string = /*wgsl*/ ` struct FragmentVarying { @location(auto) index: f32, diff --git a/src/assets/shader/core/struct/ShadingInput.ts b/src/assets/shader/core/struct/ShadingInput.ts index 764cfd8a..1f4ba2c5 100644 --- a/src/assets/shader/core/struct/ShadingInput.ts +++ b/src/assets/shader/core/struct/ShadingInput.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ShadingInput: string = /*wgsl*/ ` struct ShadingInput{ BaseColor:vec4, diff --git a/src/assets/shader/core/struct/VertexAttributeIndexShader.ts b/src/assets/shader/core/struct/VertexAttributeIndexShader.ts index 98bfaf2f..26cc5fa8 100644 --- a/src/assets/shader/core/struct/VertexAttributeIndexShader.ts +++ b/src/assets/shader/core/struct/VertexAttributeIndexShader.ts @@ -1,4 +1,6 @@ - +/** + * @internal + */ export let VertexAttributeIndexShader: string = /*wgsl*/ ` #include "WorldMatrixUniform" struct VertexAttributes{ diff --git a/src/assets/shader/core/struct/VertexAttributes.ts b/src/assets/shader/core/struct/VertexAttributes.ts index eb251d39..7635ee94 100644 --- a/src/assets/shader/core/struct/VertexAttributes.ts +++ b/src/assets/shader/core/struct/VertexAttributes.ts @@ -1,6 +1,9 @@ import { SkeletonAnimation_shader } from "../../anim/SkeletonAnimation_shader"; import { MorphTarget_shader } from "../../../../components/anim/morphAnim/MorphTarget_shader"; +/** + * @internal + */ export let VertexAttributes_vert: string = /*wgsl*/ ` var PI: f32 = 3.14159265359; #if USE_METAHUMAN diff --git a/src/assets/shader/glsl/Quad_glsl.ts b/src/assets/shader/glsl/Quad_glsl.ts index 7267cddd..5d93ffbb 100644 --- a/src/assets/shader/glsl/Quad_glsl.ts +++ b/src/assets/shader/glsl/Quad_glsl.ts @@ -1,5 +1,6 @@ - - +/** + * @internal + */ export let QuadGlsl_vs = /* wgsl */ ` #include "WorldMatrixUniform" #include "GlobalUniform" diff --git a/src/assets/shader/lighting/BRDF_frag.ts b/src/assets/shader/lighting/BRDF_frag.ts index dd7c08e2..078ee462 100644 --- a/src/assets/shader/lighting/BRDF_frag.ts +++ b/src/assets/shader/lighting/BRDF_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let BRDF_frag: string = /*wgsl*/ ` #include "Clearcoat_frag" #include "EnvMap_frag" diff --git a/src/assets/shader/lighting/BsDF_frag.ts b/src/assets/shader/lighting/BsDF_frag.ts index 8bfc8027..0a518c1a 100644 --- a/src/assets/shader/lighting/BsDF_frag.ts +++ b/src/assets/shader/lighting/BsDF_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let BsDF_frag: string = /*wgsl*/ ` #include "Clearcoat_frag" #include "BRDF_frag" diff --git a/src/assets/shader/lighting/BxDF_frag.ts b/src/assets/shader/lighting/BxDF_frag.ts index 12531cd5..f1f7af5c 100644 --- a/src/assets/shader/lighting/BxDF_frag.ts +++ b/src/assets/shader/lighting/BxDF_frag.ts @@ -1,4 +1,7 @@ import { SHCommon_frag } from './../core/common/SHCommon_frag'; +/** + * @internal + */ export let BxDF_frag: string = /*wgsl*/ ` #include "Clearcoat_frag" #include "BRDF_frag" diff --git a/src/assets/shader/lighting/Hair_frag.ts b/src/assets/shader/lighting/Hair_frag.ts index e58878eb..151cf674 100644 --- a/src/assets/shader/lighting/Hair_frag.ts +++ b/src/assets/shader/lighting/Hair_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Hair_frag: string = /*wgsl*/ ` #include "BRDF_frag" #include "MathShader" diff --git a/src/assets/shader/lighting/IESProfiles_frag.ts b/src/assets/shader/lighting/IESProfiles_frag.ts index fcf9df90..37982a07 100644 --- a/src/assets/shader/lighting/IESProfiles_frag.ts +++ b/src/assets/shader/lighting/IESProfiles_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let IESProfiles_frag: string = /*wgsl*/ ` #if USE_IES_PROFILE @group(1) @binding(auto) diff --git a/src/assets/shader/lighting/IrradianceVolumeData_frag.ts b/src/assets/shader/lighting/IrradianceVolumeData_frag.ts index 510baa86..7c0ca0ea 100644 --- a/src/assets/shader/lighting/IrradianceVolumeData_frag.ts +++ b/src/assets/shader/lighting/IrradianceVolumeData_frag.ts @@ -1,4 +1,7 @@ -export let IrradianceVolumeData_frag: string = /*wgsl*/ ` +/** + * @internal + */ +export let IrradianceVolumeData_frag: string = /*wgsl*/ ` struct IrradianceVolumeData { //0 orientationIndex:f32, diff --git a/src/assets/shader/lighting/Irradiance_frag.ts b/src/assets/shader/lighting/Irradiance_frag.ts index 477348d0..8e7c0170 100644 --- a/src/assets/shader/lighting/Irradiance_frag.ts +++ b/src/assets/shader/lighting/Irradiance_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Irradiance_frag: string = /*wgsl*/ ` #include "IrradianceVolumeData_frag" struct IrradianceField { diff --git a/src/assets/shader/lighting/LightingFunction_frag.ts b/src/assets/shader/lighting/LightingFunction_frag.ts index 4d516b50..2048bc04 100644 --- a/src/assets/shader/lighting/LightingFunction_frag.ts +++ b/src/assets/shader/lighting/LightingFunction_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let LightingFunction_frag: string = /*wgsl*/ ` #include "BRDF_frag" #include "ClusterLight" diff --git a/src/assets/shader/lighting/UnLit_frag.ts b/src/assets/shader/lighting/UnLit_frag.ts index 53f330f5..743e4091 100644 --- a/src/assets/shader/lighting/UnLit_frag.ts +++ b/src/assets/shader/lighting/UnLit_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let UnLit_frag: string = /*wgsl*/ ` #include "Common_frag" #include "GlobalUniform" diff --git a/src/assets/shader/materials/ColorLitShader.ts b/src/assets/shader/materials/ColorLitShader.ts index 73c70b64..303e4957 100644 --- a/src/assets/shader/materials/ColorLitShader.ts +++ b/src/assets/shader/materials/ColorLitShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ColorLitShader: string = /*wgsl*/` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/GIProbeShader.ts b/src/assets/shader/materials/GIProbeShader.ts index 1d6de14c..a1860d69 100644 --- a/src/assets/shader/materials/GIProbeShader.ts +++ b/src/assets/shader/materials/GIProbeShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GIProbeShader: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/GlassShader.ts b/src/assets/shader/materials/GlassShader.ts index 2f213b09..987a4539 100644 --- a/src/assets/shader/materials/GlassShader.ts +++ b/src/assets/shader/materials/GlassShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GlassShader: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/Hair_shader.ts b/src/assets/shader/materials/Hair_shader.ts index 9d860039..f46f9312 100644 --- a/src/assets/shader/materials/Hair_shader.ts +++ b/src/assets/shader/materials/Hair_shader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Hair_shader_op: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" @@ -121,6 +124,9 @@ export let Hair_shader_op: string = /*wgsl*/ ` } ` +/** + * @internal + */ export let Hair_shader_tr: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/Lambert_shader.ts b/src/assets/shader/materials/Lambert_shader.ts index 83795ea0..7271438c 100644 --- a/src/assets/shader/materials/Lambert_shader.ts +++ b/src/assets/shader/materials/Lambert_shader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Lambert_shader: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/Lit_shader.ts b/src/assets/shader/materials/Lit_shader.ts index ceca8bbd..b74ff5dc 100644 --- a/src/assets/shader/materials/Lit_shader.ts +++ b/src/assets/shader/materials/Lit_shader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let Lit_shader: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/OutlinePass.ts b/src/assets/shader/materials/OutlinePass.ts index 44689a12..3081a4f4 100644 --- a/src/assets/shader/materials/OutlinePass.ts +++ b/src/assets/shader/materials/OutlinePass.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let OutlinePass: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/PBRLItShader.ts b/src/assets/shader/materials/PBRLItShader.ts index 6fc2cc35..e46ce022 100644 --- a/src/assets/shader/materials/PBRLItShader.ts +++ b/src/assets/shader/materials/PBRLItShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let PBRLItShader: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/PBRLitSSSShader.ts b/src/assets/shader/materials/PBRLitSSSShader.ts index 6c08d7df..642f1380 100644 --- a/src/assets/shader/materials/PBRLitSSSShader.ts +++ b/src/assets/shader/materials/PBRLitSSSShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let PBRLitSSSShader: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/PavementShader.ts b/src/assets/shader/materials/PavementShader.ts index a3a8b752..3f66ca31 100644 --- a/src/assets/shader/materials/PavementShader.ts +++ b/src/assets/shader/materials/PavementShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let PavementShader: string = /*wgsl*/` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/PointShadowDebug.ts b/src/assets/shader/materials/PointShadowDebug.ts index e5788317..bc506f23 100644 --- a/src/assets/shader/materials/PointShadowDebug.ts +++ b/src/assets/shader/materials/PointShadowDebug.ts @@ -1,4 +1,7 @@ +/** + * @internal + */ export let PointShadowDebug:string = /*wgsl*/` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/ReflectionShader_shader.ts b/src/assets/shader/materials/ReflectionShader_shader.ts index 47fe593d..ec6c571c 100644 --- a/src/assets/shader/materials/ReflectionShader_shader.ts +++ b/src/assets/shader/materials/ReflectionShader_shader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ReflectionShader_shader: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/UnLit.ts b/src/assets/shader/materials/UnLit.ts index 77ef33af..05971fd0 100644 --- a/src/assets/shader/materials/UnLit.ts +++ b/src/assets/shader/materials/UnLit.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let UnLit: string = /*wgsl*/ ` #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/UnLitTextureArray.ts b/src/assets/shader/materials/UnLitTextureArray.ts index 8971946b..85b20e41 100644 --- a/src/assets/shader/materials/UnLitTextureArray.ts +++ b/src/assets/shader/materials/UnLitTextureArray.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let UnLitTextureArray: string = /*wgsl*/ ` // #include "Common_vert" #include "Common_frag" diff --git a/src/assets/shader/materials/program/BxdfDebug_frag.ts b/src/assets/shader/materials/program/BxdfDebug_frag.ts index 9c6271b8..39bd35ee 100644 --- a/src/assets/shader/materials/program/BxdfDebug_frag.ts +++ b/src/assets/shader/materials/program/BxdfDebug_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let BxdfDebug_frag: string = /*wgsl*/ ` #include "ClusterDebug_frag" diff --git a/src/assets/shader/materials/program/Clearcoat_frag.ts b/src/assets/shader/materials/program/Clearcoat_frag.ts index 8a6ae755..cc268d6c 100644 --- a/src/assets/shader/materials/program/Clearcoat_frag.ts +++ b/src/assets/shader/materials/program/Clearcoat_frag.ts @@ -1,7 +1,6 @@ - - - - +/** + * @internal + */ export let Clearcoat_frag: string = /*wgsl*/ ` #if USE_CLEARCOAT_ROUGHNESS @group(1) @binding(auto) diff --git a/src/assets/shader/materials/program/ClusterDebug_frag.ts b/src/assets/shader/materials/program/ClusterDebug_frag.ts index 77d62ad3..7b9e3c52 100644 --- a/src/assets/shader/materials/program/ClusterDebug_frag.ts +++ b/src/assets/shader/materials/program/ClusterDebug_frag.ts @@ -1,4 +1,7 @@ +/** + * @internal + */ export let ClusterDebug_frag: string = /*wgsl*/` var colorSet : array, 9> = array, 9>( vec3(1.0, 0.0, 0.0), diff --git a/src/assets/shader/materials/program/NormalMap_frag.ts b/src/assets/shader/materials/program/NormalMap_frag.ts index d8795563..e1afea3f 100644 --- a/src/assets/shader/materials/program/NormalMap_frag.ts +++ b/src/assets/shader/materials/program/NormalMap_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let NormalMap_frag: string = /*wgsl*/ ` fn perturbNormal( worldPos:vec3, surf_norm:vec3, mapN:vec3 , normalScale:f32 , face:f32 ) -> vec3 { diff --git a/src/assets/shader/materials/program/ShadowMapping_frag.ts b/src/assets/shader/materials/program/ShadowMapping_frag.ts index 15989190..91f45280 100644 --- a/src/assets/shader/materials/program/ShadowMapping_frag.ts +++ b/src/assets/shader/materials/program/ShadowMapping_frag.ts @@ -1,5 +1,8 @@ import { CSM } from "../../../../core/csm/CSM"; +/** + * @internal + */ export let ShadowMapping_frag: string = /*wgsl*/ ` @group(1) @binding(auto) var shadowMapSampler: sampler; @group(1) @binding(auto) var shadowMap: texture_depth_2d_array; diff --git a/src/assets/shader/materials/uniforms/MaterialUniform.ts b/src/assets/shader/materials/uniforms/MaterialUniform.ts index 03baf7a3..c8189d4b 100644 --- a/src/assets/shader/materials/uniforms/MaterialUniform.ts +++ b/src/assets/shader/materials/uniforms/MaterialUniform.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let MaterialUniform : string = /*wgsl*/ ` struct MaterialUniform{ #if USE_BRDF diff --git a/src/assets/shader/materials/uniforms/PhysicMaterialUniform_frag.ts b/src/assets/shader/materials/uniforms/PhysicMaterialUniform_frag.ts index f0832a79..bcb5000a 100644 --- a/src/assets/shader/materials/uniforms/PhysicMaterialUniform_frag.ts +++ b/src/assets/shader/materials/uniforms/PhysicMaterialUniform_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let PhysicMaterialUniform_frag = /* wgsl */` #if USE_CUSTOMUNIFORM #else diff --git a/src/assets/shader/materials/uniforms/UnLitMaterialUniform_frag.ts b/src/assets/shader/materials/uniforms/UnLitMaterialUniform_frag.ts index 5847578f..bf84674d 100644 --- a/src/assets/shader/materials/uniforms/UnLitMaterialUniform_frag.ts +++ b/src/assets/shader/materials/uniforms/UnLitMaterialUniform_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let UnLitMaterialUniform_frag = /* wgsl */` diff --git a/src/assets/shader/materials/uniforms/VideoUniform_frag.ts b/src/assets/shader/materials/uniforms/VideoUniform_frag.ts index 445e4877..710e1b1f 100644 --- a/src/assets/shader/materials/uniforms/VideoUniform_frag.ts +++ b/src/assets/shader/materials/uniforms/VideoUniform_frag.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let VideoUniform_frag = /* wgsl */` struct MaterialUniform { transformUV1:vec4, diff --git a/src/assets/shader/math/FastMathShader.ts b/src/assets/shader/math/FastMathShader.ts index c3ae62f8..f22b79ce 100644 --- a/src/assets/shader/math/FastMathShader.ts +++ b/src/assets/shader/math/FastMathShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let FastMathShader: string = /*wgsl*/ ` fn pow2( x : f32 ) -> f32 { diff --git a/src/assets/shader/post/FXAAShader.ts b/src/assets/shader/post/FXAAShader.ts index d867281a..903a2fa9 100644 --- a/src/assets/shader/post/FXAAShader.ts +++ b/src/assets/shader/post/FXAAShader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let FXAAShader: string = /*wgsl*/ ` #include 'BitUtil' struct FragmentOutput { diff --git a/src/assets/shader/post/GlobalFog_shader.ts b/src/assets/shader/post/GlobalFog_shader.ts index 23ba63c3..169c60e1 100644 --- a/src/assets/shader/post/GlobalFog_shader.ts +++ b/src/assets/shader/post/GlobalFog_shader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let GlobalFog_shader = /* wgsl */ ` var PI: f32 = 3.14159265359; #include "GlobalUniform" diff --git a/src/assets/shader/quad/Quad_shader.ts b/src/assets/shader/quad/Quad_shader.ts index a3225e55..3f8a96b6 100644 --- a/src/assets/shader/quad/Quad_shader.ts +++ b/src/assets/shader/quad/Quad_shader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let FullQuad_vert_wgsl: string = /*wgsl*/ ` #include "WorldMatrixUniform" #include "GlobalUniform" @@ -31,7 +34,9 @@ export let FullQuad_vert_wgsl: string = /*wgsl*/ ` return output ; } ` - +/** + * @internal + */ export let Quad_vert_wgsl: string = /*wgsl*/ ` #include "WorldMatrixUniform" #include "GlobalUniform" @@ -59,7 +64,9 @@ export let Quad_vert_wgsl: string = /*wgsl*/ ` return VertexOutput(TEXCOORD_1, vec4(uv, 0.0, 1.0)); } ` - +/** + * @internal + */ export let Quad_frag_wgsl: string = /*wgsl*/ ` struct FragmentOutput { @location(auto) o_Target: vec4 @@ -81,7 +88,9 @@ export let Quad_frag_wgsl: string = /*wgsl*/ ` return FragmentOutput(color); } ` - +/** + * @internal + */ export let Quad_depth2d_frag_wgsl: string = /*wgsl*/ ` struct FragmentOutput { @location(auto) o_Target: vec4 @@ -108,7 +117,9 @@ export let Quad_depth2d_frag_wgsl: string = /*wgsl*/ ` return FragmentOutput(vec4(depth,0.0,0.0,1.0)); } ` - +/** + * @internal + */ export let Quad_depthCube_frag_wgsl: string = /*wgsl*/ ` struct FragmentOutput { @location(auto) o_Target: vec4 @@ -172,6 +183,9 @@ export let Quad_depthCube_frag_wgsl: string = /*wgsl*/ ` } ` +/** + * @internal + */ export let Quad_depth2dArray_frag_wgsl: string = /*wgsl*/ ` struct FragmentOutput { @location(auto) o_Target: vec4 diff --git a/src/assets/shader/sky/CubeSky_Shader.ts b/src/assets/shader/sky/CubeSky_Shader.ts index 90f40b06..8405c6fc 100644 --- a/src/assets/shader/sky/CubeSky_Shader.ts +++ b/src/assets/shader/sky/CubeSky_Shader.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export class CubeSky_Shader { public static sky_vs_frag_wgsl: string = /* wgsl */ ` #include "WorldMatrixUniform" diff --git a/src/assets/shader/utils/BitUtil.ts b/src/assets/shader/utils/BitUtil.ts index eaa16959..7bd38868 100644 --- a/src/assets/shader/utils/BitUtil.ts +++ b/src/assets/shader/utils/BitUtil.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let BitUtil = /* wgsl */` const inv256:f32 = 1.0/256.0; diff --git a/src/assets/shader/utils/ColorUtil.ts b/src/assets/shader/utils/ColorUtil.ts index 35b003a8..8de139e2 100644 --- a/src/assets/shader/utils/ColorUtil.ts +++ b/src/assets/shader/utils/ColorUtil.ts @@ -1,3 +1,6 @@ +/** + * @internal + */ export let ColorUtil: string = /*wgsl*/ ` fn getHDRColor(color: vec3, exposure: f32) -> vec3 < f32 > { return color * pow(2.4, exposure) ; diff --git a/src/assets/shader/utils/GenerayRandomDir.ts b/src/assets/shader/utils/GenerayRandomDir.ts index 6e1c9971..a8f21f46 100644 --- a/src/assets/shader/utils/GenerayRandomDir.ts +++ b/src/assets/shader/utils/GenerayRandomDir.ts @@ -1,5 +1,6 @@ - - +/** + * @internal + */ export let GenerayRandomDir: string = /*wgsl*/ ` fn madfrac(A:f32, B:f32)-> f32 { return A*B-floor(A*B) ; diff --git a/src/index.ts b/src/index.ts index 18fa8bea..0f923bf7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -465,7 +465,6 @@ export * from "./materials/LambertMaterial" export * from "./materials/LitMaterial" export * from "./materials/Material" export * from "./materials/MaterialRegister" -export * from "./materials/PhysicMaterial" export * from "./materials/ReflectionMaterial" export * from "./materials/SkyMaterial" export * from "./materials/UnLitMaterial" diff --git a/src/loader/parser/gltf/GLTFSubParserConverter.ts b/src/loader/parser/gltf/GLTFSubParserConverter.ts index e316fe85..0e3f26f0 100644 --- a/src/loader/parser/gltf/GLTFSubParserConverter.ts +++ b/src/loader/parser/gltf/GLTFSubParserConverter.ts @@ -1,16 +1,13 @@ import { AnimatorComponent, BlendShapeData, BlendShapePropertyData, GLTFMaterial, LitMaterial, Material, Matrix4, PropertyAnimationClip, SkinnedMeshRenderer2 } from "../../.."; import { Engine3D } from "../../../Engine3D"; -import { SkeletonAnimationComponent } from "../../../components/SkeletonAnimationComponent"; import { DirectLight } from "../../../components/lights/DirectLight"; import { PointLight } from "../../../components/lights/PointLight"; import { SpotLight } from "../../../components/lights/SpotLight"; import { MeshRenderer } from "../../../components/renderer/MeshRenderer"; -import { SkinnedMeshRenderer } from "../../../components/renderer/SkinnedMeshRenderer"; import { Object3D } from "../../../core/entities/Object3D"; import { GeometryBase } from "../../../core/geometry/GeometryBase"; import { VertexAttributeName } from "../../../core/geometry/VertexAttributeName"; import { BlendMode } from "../../../materials/BlendMode"; -import { PhysicMaterial } from "../../../materials/PhysicMaterial"; import { Color } from "../../../math/Color"; import { RADIANS_TO_DEGREES } from "../../../math/MathUtil"; import { Quaternion } from "../../../math/Quaternion"; diff --git a/src/loader/parser/gltf/extends/KHR_materials_clearcoat.ts b/src/loader/parser/gltf/extends/KHR_materials_clearcoat.ts index e8e5aa01..2c99e327 100644 --- a/src/loader/parser/gltf/extends/KHR_materials_clearcoat.ts +++ b/src/loader/parser/gltf/extends/KHR_materials_clearcoat.ts @@ -1,7 +1,7 @@ // https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_clearcoat -import { Material } from '../../../..'; -import { PhysicMaterial } from '../../../../materials/PhysicMaterial'; +import { LitMaterial } from '../../../../materials/LitMaterial'; +import { Material } from '../../../../materials/Material'; /** * @internal @@ -16,12 +16,12 @@ export class KHR_materials_clearcoat { let KHR_materials_clearcoat = extensions[`KHR_materials_clearcoat`]; if (`clearcoatFactor` in KHR_materials_clearcoat) { dmaterial.clearcoatFactor = KHR_materials_clearcoat[`clearcoatFactor`]; - (tMaterial as PhysicMaterial).clearcoatFactor = dmaterial.clearcoatFactor; + (tMaterial as LitMaterial).clearcoatFactor = dmaterial.clearcoatFactor; } if (`clearcoatRoughnessFactor` in KHR_materials_clearcoat) { dmaterial.clearcoatRoughnessFactor = KHR_materials_clearcoat[`clearcoatRoughnessFactor`]; - (tMaterial as PhysicMaterial).clearcoatRoughnessFactor = dmaterial.clearcoatRoughnessFactor; + (tMaterial as LitMaterial).clearcoatRoughnessFactor = dmaterial.clearcoatRoughnessFactor; } } } diff --git a/src/loader/parser/prefab/mats/shader/StandShader.ts b/src/loader/parser/prefab/mats/shader/StandShader.ts index ae3fc388..f4ec1ff0 100644 --- a/src/loader/parser/prefab/mats/shader/StandShader.ts +++ b/src/loader/parser/prefab/mats/shader/StandShader.ts @@ -3,7 +3,6 @@ import { Texture } from "../../../../../gfx/graphics/webGpu/core/texture/Texture import { RenderShaderPass } from "../../../../../gfx/graphics/webGpu/shader/RenderShaderPass"; import { Color } from "../../../../../math/Color"; import { Vector4 } from "../../../../../math/Vector4"; -import { RegisterShader } from "../../../../../util/SerializeDecoration"; import { Shader } from "../../../../../gfx/graphics/webGpu/shader/Shader"; diff --git a/src/materials/LitMaterial.ts b/src/materials/LitMaterial.ts index 227e1ee3..30c91d65 100644 --- a/src/materials/LitMaterial.ts +++ b/src/materials/LitMaterial.ts @@ -1,11 +1,7 @@ -import { Vector4 } from ".."; -import { Engine3D } from "../Engine3D"; import { Texture } from "../gfx/graphics/webGpu/core/texture/Texture"; -import { RenderShaderPass } from "../gfx/graphics/webGpu/shader/RenderShaderPass"; import { StandShader } from "../loader/parser/prefab/mats/shader/StandShader"; import { Color } from "../math/Color"; import { Material } from "./Material"; -import { PhysicMaterial } from "./PhysicMaterial"; export class LitMaterial extends Material { diff --git a/src/materials/MaterialRegister.ts b/src/materials/MaterialRegister.ts index f8303a37..4f666726 100644 --- a/src/materials/MaterialRegister.ts +++ b/src/materials/MaterialRegister.ts @@ -11,7 +11,6 @@ export type MaterialClassName = | 'GUIMaterial' | 'ChromaKeyMaterial' | 'LambertMaterial' - | 'PhysicMaterial' | 'SkyMaterial' | 'UnLitMaterial' | 'VideoMaterial' diff --git a/src/materials/PhysicMaterial.ts b/src/materials/PhysicMaterial.ts deleted file mode 100644 index 35e9028e..00000000 --- a/src/materials/PhysicMaterial.ts +++ /dev/null @@ -1,516 +0,0 @@ -import { Engine3D } from '../Engine3D'; -import { Texture } from '../gfx/graphics/webGpu/core/texture/Texture'; -import { Color } from '../math/Color'; -import { Vector4 } from '../math/Vector4'; -import { Material } from './Material'; - -/** - * @internal - * @group Material - */ -export class PhysicMaterial extends Material { - - constructor() { - super(); - this.init(); - } - - private init() { - let bdrflutTex = Engine3D.res.getTexture(`BRDFLUT`); - this.brdfLUT = bdrflutTex; - - this.setDefault(); - this.baseMap = Engine3D.res.whiteTexture; - this.normalMap = Engine3D.res.normalTexture; - this.emissiveMap = Engine3D.res.blackTexture; - this.alphaCutoff = 0.5; - } - - // public get shader(): RenderShader { - // return this._shader; - // } - - /** - * Set the render shader default value - */ - public setDefault() { - let colorPass = this.shader.getDefaultColorShader(); - colorPass.setUniformFloat(`shadowBias`, 0.00035); - colorPass.setUniformColor(`baseColor`, new Color()); - colorPass.setUniformColor(`emissiveColor`, new Color(1, 1, 1)); - colorPass.setUniformVector4(`materialF0`, new Vector4(0.04, 0.04, 0.04, 1)); - colorPass.setUniformColor(`specularColor`, new Color(0.04, 0.04, 0.04)); - colorPass.setUniformFloat(`envIntensity`, 1); - colorPass.setUniformFloat(`normalScale`, 1); - colorPass.setUniformFloat(`roughness`, 1.0); - colorPass.setUniformFloat(`metallic`, 0.0); - colorPass.setUniformFloat(`ao`, 1.0); - colorPass.setUniformFloat(`roughness_min`, 0.0); - colorPass.setUniformFloat(`roughness_max`, 1.0); - colorPass.setUniformFloat(`metallic_min`, 0.0); - colorPass.setUniformFloat(`metallic_max`, 1.0); - colorPass.setUniformFloat(`emissiveIntensity`, 0.0); - colorPass.setUniformFloat(`alphaCutoff`, 0.0); - colorPass.setUniformFloat(`ior`, 1.5); - colorPass.setUniformFloat(`empty`, 1.5); - colorPass.setUniformFloat(`clearcoatFactor`, 0.0); - colorPass.setUniformFloat(`clearcoatRoughnessFactor`, 0.0); - colorPass.setUniformColor(`clearcoatColor`, new Color(1, 1, 1)); - colorPass.setUniformFloat(`clearcoatWeight`, 0.0); - colorPass.setUniformFloat(`empty`, 0.0); - - colorPass.setUniformVector4(`baseMapOffsetSize`, new Vector4(0, 0, 1, 1)); - colorPass.setUniformVector4(`normalMapOffsetSize`, new Vector4(0, 0, 1, 1)); - colorPass.setUniformVector4(`emissiveMapOffsetSize`, new Vector4(0, 0, 1, 1)); - colorPass.setUniformVector4(`roughnessMapOffsetSize`, new Vector4(0, 0, 1, 1)); - colorPass.setUniformVector4(`metallicMapOffsetSize`, new Vector4(0, 0, 1, 1)); - colorPass.setUniformVector4(`aoMapOffsetSize`, new Vector4(0, 0, 1, 1)); - } - - - public get baseMap(): Texture { - return this.shader.getDefaultColorShader().getTexture(`baseMap`); - } - - public set baseMap(value: Texture) { - this.shader.getDefaultColorShader().setTexture(`baseMap`, value); - } - - public get baseColor(): Color { - return this.shader.getDefaultColorShader().getUniform(`baseColor`); - } - - public set baseColor(value: Color) { - this.shader.getDefaultColorShader().setUniformColor(`baseColor`, value); - } - - public get normalMap(): Texture { - return this.shader.getDefaultColorShader().getTexture(`normalMap`); - } - - public set normalMap(value: Texture) { - this.shader.getDefaultColorShader().setTexture(`normalMap`, value); - } - - public get doubleSide(): boolean { - return this.shader.getDefaultColorShader().doubleSide; - } - public set doubleSide(value: boolean) { - this.shader.getDefaultColorShader().doubleSide = value; - } - - public get alphaCutoff(): any { - return this.shader.getDefaultColorShader().shaderState.alphaCutoff; - } - public set alphaCutoff(value: any) { - this.shader.getDefaultColorShader().setDefine("USE_ALPHACUT", true); - this.shader.getDefaultColorShader().shaderState.alphaCutoff = value; - this.shader.getDefaultColorShader().setUniform(`alphaCutoff`, value); - } - - public get emissiveColor(): Color { - return this.shader.getDefaultColorShader().getUniform(`emissiveColor`); - } - - public set emissiveColor(value: Color) { - this.shader.getDefaultColorShader().setUniform(`emissiveColor`, value); - } - - public get emissiveIntensity(): number { - return this.shader.getDefaultColorShader().getUniform(`emissiveIntensity`); - } - - public set emissiveIntensity(value: number) { - this.shader.getDefaultColorShader().setUniform(`emissiveIntensity`, value); - } - - /** - * get transformUV1 - */ - public get baseMapUVOffsetSize(): Vector4 { - return this.shader.getDefaultColorShader().uniforms[`baseMapOffsetSize`].vector4; - } - - /** - * set transformUV1 - */ - public set baseMapUVOffsetSize(value: Vector4) { - this.shader.getDefaultColorShader().setUniform(`baseMapOffsetSize`, value); - } - - /** - * get transformUV1 - */ - public get normalMapUVOffsetSize(): Vector4 { - return this.shader.getDefaultColorShader().uniforms[`normalMapOffsetSize`].vector4; - } - - /** - * set transformUV1 - */ - public set normalMapUVOffsetSize(value: Vector4) { - this.shader.getDefaultColorShader().setUniform(`normalMapOffsetSize`, value); - } - - /** - * get transformUV1 - */ - public get emissiveMapUVOffsetSize(): Vector4 { - return this.shader.getDefaultColorShader().uniforms[`emissiveMapOffsetSize`].vector4; - } - - /** - * set transformUV1 - */ - public set emissiveMapUVOffsetSize(value: Vector4) { - this.shader.getDefaultColorShader().setUniform(`emissiveMapOffsetSize`, value); - } - - /** - * get transformUV1 - */ - public get pbrMetallicMapUVOffsetSize(): Vector4 { - return this.shader.getDefaultColorShader().uniforms[`roughnessMapOffsetSize`].vector4; - } - - /** - * set transformUV1 - */ - public set pbrMetallicMapUVOffsetSize(value: Vector4) { - this.shader.getDefaultColorShader().setUniform(`roughnessMapOffsetSize`, value); - } - - public get depthWriteEnabled(): boolean { - return this.shader.getDefaultColorShader().shaderState.depthWriteEnabled; - } - public set depthWriteEnabled(value: boolean) { - this.shader.getDefaultColorShader().shaderState.depthWriteEnabled = value; - } - - /** - * get reflectivity - */ - public get materialF0(): Vector4 { - return this.shader.getDefaultColorShader().uniforms[`materialF0`].vector4; - } - - /** - * set reflectivity - */ - public set materialF0(value: Vector4) { - this.shader.getDefaultColorShader().setUniform(`materialF0`, value); - } - - /** - * get specularColor - */ - public get specularColor(): Color { - return this.shader.getDefaultColorShader().uniforms[`specularColor`].color; - } - - /**specularColor - * set reflectivity - */ - public set specularColor(value: Color) { - this.shader.getDefaultColorShader().setUniform(`specularColor`, value); - } - - /** - * get roughness - */ - public get roughness(): number { - return this.shader.getDefaultColorShader().uniforms[`roughness`].value; - } - - /** - * set roughness - */ - public set roughness(value: number) { - this.shader.getDefaultColorShader().setUniform(`roughness`, value); - } - - /** - * get metallic - */ - public get metallic(): number { - return this.shader.getDefaultColorShader().uniforms[`metallic`].value; - } - - /** - * set metallic - */ - public set metallic(value: number) { - this.shader.getDefaultColorShader().setUniform(`metallic`, value); - } - - /** - * get Ambient Occlussion, dealing with the effect of ambient light on object occlusion - */ - public get ao(): number { - return this.shader.getDefaultColorShader().uniforms[`ao`].value; - } - - /** - * set Ambient Occlussion, dealing with the effect of ambient light on object occlusion - */ - public set ao(value: number) { - this.shader.getDefaultColorShader().setUniform(`ao`, value); - } - - /** - * get min metallic - */ - public get metallic_min(): number { - return this.shader.getDefaultColorShader().uniforms[`metallic_min`].value; - } - - /** - * set min metallic - */ - public set metallic_min(value: number) { - this.shader.getDefaultColorShader().setUniform(`metallic_min`, value); - } - - /** - * get max metallic - */ - public get metallic_max(): number { - return this.shader.getDefaultColorShader().uniforms[`metallic_max`].value; - } - - /** - * set max metallic - */ - public set metallic_max(value: number) { - this.shader.getDefaultColorShader().setUniform(`metallic_max`, value); - } - - /** - * get min roughness - */ - public get roughness_min(): number { - return this.shader.getDefaultColorShader().uniforms[`roughness_min`].value; - } - - /** - * set min roughness - */ - public set roughness_min(value: number) { - this.shader.getDefaultColorShader().setUniform(`roughness_min`, value); - } - - /** - * get max roughness - */ - public get roughness_max(): number { - return this.shader.getDefaultColorShader().uniforms[`roughness_max`].value; - } - - /** - * set max roughness - */ - public set roughness_max(value: number) { - this.shader.getDefaultColorShader().setUniform(`roughness_max`, value); - } - - /** - * Get the influence of Normal mapping on materials - */ - public get normalScale(): number { - return this.shader.getDefaultColorShader().uniforms[`normalScale`].value; - } - - /** - * Set the influence of Normal mapping on materials - */ - public set normalScale(value: number) { - this.shader.getDefaultColorShader().setUniform(`normalScale`, value); - } - - /** - * get Mask Map - * R_chanel -> AoMap - * G_chanel -> Roughness - * B_chanel -> Metallic - * A_chanel -> C - */ - public get maskMap(): Texture { - return this.shader.getDefaultColorShader().textures[`maskMap`]; - } - - /** - * set Mask Map - * R_chanel -> AoMap - * G_chanel -> Roughness - * B_chanel -> Metallic - * A_chanel -> C - */ - public set maskMap(value: Texture) { - // USE_MR - // USE_ORMC - // USE_RMOC - // USE_CRMC - this.shader.getDefaultColorShader().setDefine(`USE_MR`, true); - this.shader.getDefaultColorShader().setTexture(`maskMap`, value); - } - - /** - * set Ambient Occlussion Map, dealing with the effect of ambient light on object occlusion - */ - public set aoMap(value: Texture) { - if (!value) return; - this.shader.getDefaultColorShader().setTexture(`aoMap`, value); - if (value != Engine3D.res.whiteTexture) { - this.shader.getDefaultColorShader().setDefine(`USE_AOTEX`, true); - } - } - - /** - * get Ambient Occlussion Map, dealing with the effect of ambient light on object occlusion - */ - public get aoMap(): Texture { - return this.shader.getDefaultColorShader().textures[`aoMap`]; - } - - /** - * set clearCoatRoughnessMap - */ - public set clearCoatRoughnessMap(value: Texture) { - if (!value) return; - console.log("USE_CLEARCOAT_ROUGHNESS"); - - this.shader.getDefaultColorShader().setTexture(`clearCoatRoughnessMap`, value); - this.shader.getDefaultColorShader().setDefine(`USE_CLEARCOAT_ROUGHNESS`, true); - } - - /** - * get clearCoatRoughnessMap - */ - public get clearCoatRoughnessMap(): Texture { - return this.shader.getDefaultColorShader().textures[`clearCoatRoughnessMap`]; - } - - /** - * get brdf query map - */ - public get brdfLUT(): Texture { - return this.shader.getDefaultColorShader().textures[`brdfLUT`]; - } - - /** - * set brdf query map - */ - public set brdfLUT(value: Texture) { - this.shader.getDefaultColorShader().setTexture(`brdfLUT`, value); - this.shader.getDefaultColorShader().setTexture(`brdflutMap`, value); - } - - /** - * get emissive map - */ - public get emissiveMap(): Texture { - return this.shader.getDefaultColorShader().textures[`emissiveMap`]; - } - - /** - * set emissive map - */ - public set emissiveMap(value: Texture) { - this.shader.getDefaultColorShader().setTexture(`emissiveMap`, value); - } - - /** - * set intensity of environment light or color of sampled by texture - */ - public set envIntensity(value: number) { - this.shader.getDefaultColorShader().setUniformFloat(`envIntensity`, value); - } - - /** - * get intensity of environment light or color of sampled by texture - */ - public get envIntensity() { - return this.shader.getDefaultColorShader().uniforms[`envIntensity`].value; - } - - /** - * set factor of refractive - */ - public set ior(value: number) { - this.shader.getDefaultColorShader().setUniformFloat(`ior`, value); - } - - /** - * get factor of refractive - */ - public get ior(): number { - return this.shader.getDefaultColorShader().uniforms[`ior`].value; - } - - /** - * valid USE_CLEARCOAT define in shader - */ - public useCleanCoat() { - this.shader.getDefaultColorShader().setDefine("USE_CLEARCOAT", true); - } - - /** - * Set the factor of the clearcoat - */ - public set clearcoatFactor(value: number) { - this.shader.getDefaultColorShader().setUniformFloat(`clearcoatFactor`, value); - this.useCleanCoat(); - } - - /** - * get the factor of the clearcoat - */ - public get clearcoatFactor(): number { - return this.shader.getDefaultColorShader().uniforms[`clearcoatFactor`].value; - } - - /** - * set the factor of the clearcoat Roughness - */ - public set clearcoatRoughnessFactor(value: number) { - this.shader.getDefaultColorShader().setUniformFloat(`clearcoatRoughnessFactor`, value); - this.useCleanCoat(); - } - - /** - * get the factor of the clearcoat Roughness - */ - public get clearcoatRoughnessFactor(): number { - return this.shader.getDefaultColorShader().uniforms[`clearcoatRoughnessFactor`].value; - } - - /** - * set the weight of the clearcoat - */ - public set clearcoatWeight(value: number) { - this.shader.getDefaultColorShader().setUniformFloat(`clearcoatWeight`, value); - this.useCleanCoat(); - } - - /** - * get the weight of the clearcoat - */ - public get clearcoatWeight(): number { - return this.shader.getDefaultColorShader().uniforms[`clearcoatWeight`].value; - } - - /** - * get the color of the clearcoat - */ - public set clearcoatColor(value: Color) { - this.shader.getDefaultColorShader().setUniformColor(`clearcoatColor`, value); - this.useCleanCoat(); - } - - /** - * set the color of the clearcoat - */ - public get clearcoatColor(): Color { - return this.shader.getDefaultColorShader().uniforms[`clearcoatColor`].color; - } -}