Improve shadows and add antialiasing
This commit is contained in:
parent
7d2c74d6a8
commit
40b9644171
13 changed files with 182 additions and 187 deletions
|
|
@ -5,6 +5,7 @@ export interface DrawableDescriptor {
|
|||
uniformCountMacroName: string;
|
||||
sdf?: {
|
||||
shader: string;
|
||||
isInverted?: boolean;
|
||||
distanceFunctionName: string;
|
||||
};
|
||||
shaderCombinationSteps: Array<number>;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,9 @@ export class InvertedTunnel extends Drawable {
|
|||
uniform float toRadii[INVERTED_TUNNEL_COUNT];
|
||||
|
||||
float invertedTunnelMinDistance(vec2 target, out float colorIndex) {
|
||||
float minDistance = 1000.0;
|
||||
colorIndex = 3.0;
|
||||
|
||||
float minDistance = 1000.0;
|
||||
for (int i = 0; i < INVERTED_TUNNEL_COUNT; i++) {
|
||||
vec2 targetFromDelta = target - froms[i];
|
||||
|
||||
|
|
@ -37,6 +38,7 @@ export class InvertedTunnel extends Drawable {
|
|||
return -minDistance;
|
||||
}
|
||||
`,
|
||||
isInverted: true,
|
||||
distanceFunctionName: 'invertedTunnelMinDistance',
|
||||
},
|
||||
propertyUniformMapping: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue