Skip to content

Commit

Permalink
chore: clear shader docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lslzl3000 committed Jul 27, 2024
1 parent cc90b82 commit fc74fa1
Show file tree
Hide file tree
Showing 139 changed files with 445 additions and 562 deletions.
1 change: 1 addition & 0 deletions packages/debug/GUIHelp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ class _GUIHelp {
}
}
}

/**
* @internal
*/
Expand Down
3 changes: 3 additions & 0 deletions packages/effect/grass/shader/GrassBaseShader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let GrassBaseShader = /*wgsl*/ `
#include "GlobalUniform"
#include "FragmentOutput"
Expand Down
3 changes: 3 additions & 0 deletions packages/effect/grass/shader/GrassCastShadowShader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let GrassCastShadowShader = /* wgsl */`
#include "WorldMatrixUniform"
#include "GrassVertexAttributeShader"
Expand Down
3 changes: 3 additions & 0 deletions packages/effect/grass/shader/GrassShader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let GrassShader = /* wgsl */`
#include "WorldMatrixUniform"
#include "GrassVertexAttributeShader"
Expand Down
3 changes: 3 additions & 0 deletions packages/effect/grass/shader/GrassVertexAttributeShader.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

/**
* @internal
*/
export let GrassVertexAttributeShader: string = /*wgsl*/ `
#include "WorldMatrixUniform"
struct VertexAttributes{
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/graphic3d/Graphic3DShader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let Graphic3DShader: string = /*wgsl*/ `
#include "WorldMatrixUniform"
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/graphic3d/GraphicDecCompute.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let graphicDecCompute = (segmentCode: number) => {
let code = /*wgsl*/`
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/graphic3d/GraphicDynamicCompute.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let graphicDynamicCompute = (subCode: string) => {
let code = /*wgsl*/`
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/graphic3d/GraphicFaceComput2.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let graphicFaceCompute2 = (segmentCode: number) => {
let code = /*wgsl*/`
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/graphic3d/GraphicFaceCompute.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let graphicFaceCompute = (segmentCode: number) => {
let code = /*wgsl*/`
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/graphic3d/GraphicFaceCompute3.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let GraphicFaceCompute3 = (segmentCode: number) => {
let code = /*wgsl*/`
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/graphic3d/GraphicLineCompute.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let GraphicLineCompute = () => {
let code = /*wgsl*/`
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/graphic3d/GraphicTrailCompute.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let graphicTrailCompute = (segmentCode: number) => {
let code = /*wgsl*/`
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/graphic3d/GraphicTrailCompute2.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let GraphicTrailCompute2 = (segmentCode: number) => {
let code = /*wgsl*/`
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/grass/GrassAnimCompute_cs.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/**
* @internal
*/
export let GrassAnimCompute_cs = /*wgsl*/`
`
3 changes: 3 additions & 0 deletions packages/graphic/compute/grass/GrassGeometryCompute_cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let GrassGeometryCompute_cs = /*wgsl*/`
struct GrassNode {
grassCount: f32,
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/shape3d/CircleShape3DCode_cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let CircleShape3DCode_cs = /*wgsl*/`
struct CircleShape3D {
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/shape3d/EllipseShape3DCode_cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let EllipseShape3DCode_cs = /*wgsl*/`
struct EllipseShape3D {
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/shape3d/Path2DShape3DCode_cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let Path2DShape3DCode_cs = /*wgsl*/`
struct Path2DShape3D {
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/shape3d/Path3DShape3DCode_cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let Path3DShape3DCode_cs = /*wgsl*/`
struct Path3DShape3D {
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/shape3d/RoundRectShape3DCode_cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let RoundRectShape3DCode_cs = /*wgsl*/`
struct RoundRectShape3D {
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/shape3d/Shape3DCommonCode_cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/shape3d/Shape3DKeyPointCompute_cs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { Shape3DCommonCode_cs } from "./Shape3DCommonCode_cs";

/**
* @internal
*/
export let Shape3DKeyPointCompute_cs = /*wgsl*/`
${Shape3DCommonCode_cs}
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/shape3d/Shape3DVertexCompute_cs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { Shape3DCommonCode_cs } from "./Shape3DCommonCode_cs";

/**
* @internal
*/
export let Shape3DVertexCompute_cs = /*wgsl*/`
${Shape3DCommonCode_cs}
Expand Down
3 changes: 3 additions & 0 deletions packages/graphic/compute/shape3d/Shape3DVertexFillZero_cs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { Shape3DCommonCode_cs } from "./Shape3DCommonCode_cs";

/**
* @internal
*/
export let Shape3DVertexFillZero_cs = /*wgsl*/`
${Shape3DCommonCode_cs}
Expand Down
3 changes: 3 additions & 0 deletions packages/media-extention/ChromaKeyShader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let ChromaKeyShader = /*wgsl*/`
#include "Common_vert"
#include "Common_frag"
Expand Down
3 changes: 3 additions & 0 deletions packages/media-extention/VideoShader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let VideoShader = /*wgsl*/`
#include "Common_vert"
#include "Common_frag"
Expand Down
3 changes: 3 additions & 0 deletions packages/particle/shader/ParticleRenderShader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let ParticleRenderShader = /* wgsl */ `
#include "Common_vert"
#include "Common_frag"
Expand Down
1 change: 1 addition & 0 deletions packages/particle/shader/Particle_Mass_UnLight_shader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ fn main(
return VertexOutput(Vertex_Uv ,vWorldPos.xyz,vWorldNormal, position );
}
`;

/**
* @internal
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FastMath_shader } from './FastMath';

/**
* @internal
*/
Expand Down
3 changes: 3 additions & 0 deletions packages/physics/Physics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,8 @@ class _Physics {
* ```
* @group Plugin
*/
/**
* @internal
*/
export let Physics = new _Physics();
export {Ammo}
3 changes: 3 additions & 0 deletions src/assets/shader/anim/SkeletonAnimation_shader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export class SkeletonAnimation_shader {
public static groupBindingAndFunctions(beginGroup: number, beginBinding: number) {
return /* wgsl */ `
Expand Down
3 changes: 3 additions & 0 deletions src/assets/shader/cluster/ClusterBoundsSource_cs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { ClusterConfig } from "../../../gfx/renderJob/passRenderer/cluster/ClusterConfig";

/**
* @internal
*/
export let ClusterBoundsSource_cs: string = /* wgsl */`
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions src/assets/shader/cluster/ClusterLighting_cs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { ClusterConfig } from "../../../gfx/renderJob/passRenderer/cluster/ClusterConfig";

/**
* @internal
*/
export let ClusterLighting_cs: string = /*wgsl*/`
#include "GlobalUniform"
Expand Down
3 changes: 3 additions & 0 deletions src/assets/shader/compute/BLUR_CsShader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let BLUR_CsShader: string = /* wgsl */`
#include "GlobalUniform"
Expand Down
4 changes: 3 additions & 1 deletion src/assets/shader/compute/BRDFLUT.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

/**
* @internal
*/
export let BRDFLUT: string = /*wgsl*/ `
var<private>PI: f32 = 3.141592653589793;
Expand Down
29 changes: 22 additions & 7 deletions src/assets/shader/compute/BloomEffect_cs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ColorUtil } from "../utils/ColorUtil";

/**
* @internal
*/
let BloomCfg = /*wgsl*/ `
struct BloomCfg{
downSampleStep: f32,
Expand All @@ -25,7 +27,9 @@ let CalcUV_01 = /*wgsl*/ `
`

//_______________calc weight

/**
* @internal
*/
let GaussWeight2D: string = /*wgsl*/ `
fn GaussWeight2D(x:f32, y:f32, sigma:f32) -> f32
{
Expand All @@ -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<f32>, n:i32, stride:vec2<f32>, sigma:f32) -> vec3<f32>
{
var color = vec3<f32>(0.0);
Expand Down Expand Up @@ -69,7 +74,9 @@ let GaussBlur = function (GaussNxN: string, inTex: string, inTexSampler: string)


//________________________pixel filter

/**
* @internal
*/
export let threshold: string = /*wgsl*/ `
${ColorUtil}
${BloomCfg}
Expand Down Expand Up @@ -105,7 +112,9 @@ fn CsMain( @builtin(workgroup_id) workgroup_id : vec3<u32> , @builtin(global_inv
`

//________________________down sample

/**
* @internal
*/
export let downSample: string = /*wgsl*/ `
${BloomCfg}
Expand Down Expand Up @@ -139,6 +148,9 @@ fn CsMain( @builtin(workgroup_id) workgroup_id : vec3<u32> , @builtin(global_inv


//__________________________up sample
/**
* @internal
*/
export let upSample = /*wgsl*/ `
${BloomCfg}
Expand Down Expand Up @@ -180,6 +192,9 @@ fn CsMain( @builtin(workgroup_id) workgroup_id : vec3<u32> , @builtin(global_inv


//__________________________blend
/**
* @internal
*/
export let post = /*wgsl*/ `
${ColorUtil}
${BloomCfg}
Expand Down
6 changes: 6 additions & 0 deletions src/assets/shader/compute/BlurEffectCreator_cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let BlurEffectCreatorSample_cs: string = /*wgsl*/ `
struct ImageSize {
srcWidth: i32,
Expand All @@ -20,6 +23,9 @@ export let BlurEffectCreatorSample_cs: string = /*wgsl*/ `
}
`

/**
* @internal
*/
export let BlurEffectCreatorBlur_cs: string = /*wgsl*/ `
struct ImageSize {
srcWidth: i32,
Expand Down
3 changes: 3 additions & 0 deletions src/assets/shader/compute/DDGIIrradiance_Cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let DDGIIrradiance_shader = /*wgsl*/`
#include "GenerayRandomDir"
#include "MathShader"
Expand Down
3 changes: 3 additions & 0 deletions src/assets/shader/compute/DDGILighting_CSShader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { CSM } from "../../../core/csm/CSM";

/**
* @internal
*/
export let DDGILighting_shader = /*wgsl*/`
var<private> PI: f32 = 3.14159265359;
Expand Down
3 changes: 3 additions & 0 deletions src/assets/shader/compute/DepthOfView_cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let DepthOfView_cs: string = /*wgsl*/ `
#include "GlobalUniform"
#include "GBufferStand"
Expand Down
3 changes: 3 additions & 0 deletions src/assets/shader/compute/ErpImage2CubeMapCreateCube_cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @internal
*/
export let ErpImage2CubeMapCreateCube_cs: string = /*wgsl*/ `
struct ImageSize {
srcWidth : i32,
Expand Down
Loading

0 comments on commit fc74fa1

Please sign in to comment.