-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: clean up selections from rx-state
- Loading branch information
Showing
11 changed files
with
128 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
libs/angular-three-soba/shaders/src/lib/soft-shadow-material/soft-shadow-material.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import * as THREE from 'three'; | ||
import { shaderMaterial } from '../shader-material/shader-material'; | ||
|
||
export const SoftShadowMaterial = shaderMaterial( | ||
{ | ||
color: new THREE.Color(), | ||
blend: 2.0, | ||
alphaTest: 0.75, | ||
opacity: 0, | ||
map: null, | ||
}, | ||
// language=GLSL | ||
` | ||
varying vec2 vUv; | ||
void main() { | ||
gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.); | ||
vUv = uv; | ||
} | ||
`, | ||
// language=GLSL | ||
` | ||
varying vec2 vUv; | ||
uniform sampler2D map; | ||
uniform vec3 color; | ||
uniform float blend; | ||
uniform float opacity; | ||
uniform float alphaTest; | ||
void main() { | ||
vec4 sampledDiffuseColor = texture2D(map, vUv); | ||
gl_FragColor = vec4(color * sampledDiffuseColor.r * blend, max(0.0, (1.0 - (sampledDiffuseColor.r + sampledDiffuseColor.g + sampledDiffuseColor.b) / alphaTest)) * opacity); | ||
#include <tonemapping_fragment> | ||
#include <encodings_fragment> | ||
} | ||
` | ||
); | ||
|
||
export type SoftShadowMaterialInputs = { | ||
map: THREE.Texture; | ||
color?: THREE.ColorRepresentation; | ||
alphaTest?: number; | ||
blend?: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.