Render in NDC
This commit is contained in:
parent
40a660b7cb
commit
05682dd2d5
1 changed files with 106 additions and 82 deletions
|
|
@ -9,6 +9,7 @@ export class DrawableTunnel extends TunnelShape implements IDrawable {
|
|||
uniformName: 'lines',
|
||||
countMacroName: 'lineCount',
|
||||
shaderCombinationSteps: settings.shaderCombinations.lineSteps,
|
||||
empty: new DrawableTunnel(vec2.fromValues(0, 0), vec2.fromValues(0, 0), 0, 0),
|
||||
};
|
||||
|
||||
public serializeToUniforms(uniforms: any, scale: number, transform: mat2d): void {
|
||||
|
|
@ -19,7 +20,7 @@ export class DrawableTunnel extends TunnelShape implements IDrawable {
|
|||
|
||||
uniforms[uniformName].push({
|
||||
from: vec2.transformMat2d(vec2.create(), this.from, transform),
|
||||
toFromDelta: vec2.transformMat2d(vec2.create(), this.toFromDelta, transform),
|
||||
toFromDelta: vec2.scale(vec2.create(), this.toFromDelta, scale),
|
||||
fromRadius: this.fromRadius * scale,
|
||||
toRadius: this.toRadius * scale,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue