Skip to content

Commit

Permalink
[feat] Adding RenderPixelatedPass types. (#302)
Browse files Browse the repository at this point in the history
* feat: Adding RenderPixelatedPass types. #301

* fix: Deleting PixelShader and replacing it in `other_files.txt`. #301

* fix: Adding contributor. #301

* fix: Fixing `other_files` RenderPixelatedPass declaration. #301

* fix: Adding type to fsquad. #301
  • Loading branch information
LuchoTurtle authored Dec 19, 2022
1 parent 1a8fecb commit db5181a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,15 @@
"contributions": [
"code"
]
},
{
"login": "LuchoTurtle",
"name": "LuchoTurtle",
"avatar_url": "https://avatars.githubusercontent.com/u/17494745?v=4",
"profile": "https://github.com/LuchoTurtle",
"contributions": [
"code"
]
}
],
"skipCi": true,
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://github.com/Suprhimp"><img src="https://avatars.githubusercontent.com/u/73486185?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Suprhimp</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=Suprhimp" title="Code">💻</a></td>
<td align="center"><a href="https://www.stephenli.ca/"><img src="https://avatars.githubusercontent.com/u/458691?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stephen Li</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=Trinovantes" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/autonomobil"><img src="https://avatars.githubusercontent.com/u/31781343?s=96&v=4?s=100" width="100px;" alt=""/><br /><sub><b>Moritz Cremer</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=autonomobil" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/LuchoTurtle"><img src="https://avatars.githubusercontent.com/u/17494745?v=4?s=100" width="100px;" alt=""/><br /><sub><b>LuchoTurtle</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=LuchoTurtle" title="Code">💻</a></td>
</tr>
</table>

<!-- markdownlint-restore -->
Expand Down
2 changes: 1 addition & 1 deletion types/three/OTHER_FILES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ examples/jsm/postprocessing/LUTPass.d.ts
examples/jsm/postprocessing/MaskPass.d.ts
examples/jsm/postprocessing/OutlinePass.d.ts
examples/jsm/postprocessing/RenderPass.d.ts
examples/jsm/postprocessing/RenderPixelatedPass.d.ts
examples/jsm/postprocessing/BloomPass.d.ts
examples/jsm/postprocessing/SAOPass.d.ts
examples/jsm/postprocessing/SMAAPass.d.ts
Expand Down Expand Up @@ -150,7 +151,6 @@ examples/jsm/shaders/LuminosityHighPassShader.d.ts
examples/jsm/shaders/LuminosityShader.d.ts
examples/jsm/shaders/MirrorShader.d.ts
examples/jsm/shaders/NormalMapShader.d.ts
examples/jsm/shaders/PixelShader.d.ts
examples/jsm/shaders/RGBShiftShader.d.ts
examples/jsm/shaders/SAOShader.d.ts
examples/jsm/shaders/SepiaShader.d.ts
Expand Down
28 changes: 28 additions & 0 deletions types/three/examples/jsm/postprocessing/RenderPixelatedPass.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Scene, Camera, ShaderMaterial, Vector2, MeshNormalMaterial, WebGLRenderTarget } from '../../../src/Three';

import { Pass, FullScreenQuad } from './Pass';

export interface RenderPixelatedPassParameters {
normalEdgeStrength?: number;
depthEdgeStrength?: number;
}

export class RenderPixelatedPass extends Pass {
constructor(pixelSize: number, scene: Scene, camera: Camera, options?: RenderPixelatedPassParameters);
pixelSize: number;
resolution: Vector2;
renderResolution: Vector2;

pixelatedMaterial: ShaderMaterial;
normalMaterial: MeshNormalMaterial;

fsQuad: FullScreenQuad;
scene: Scene;
camera: Camera;

normalEdgeStrength: RenderPixelatedPassParameters['normalEdgeStrength'];
depthEdgeStrength: RenderPixelatedPassParameters['depthEdgeStrength'];

beautyRenderTarget: WebGLRenderTarget;
normalRenderTarget: WebGLRenderTarget;
}
11 changes: 0 additions & 11 deletions types/three/examples/jsm/shaders/PixelShader.d.ts

This file was deleted.

0 comments on commit db5181a

Please sign in to comment.