Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
AVIF/src/obu.c, renamed in this repository as AVIF/src/avif_obu.c
================================================================

Copyright © 2018-2019, VideoLAN and dav1d authors
Copyright © 2018-2019, VideoLAN and dav1d authors
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -878,3 +878,36 @@ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

================================================================
dashDotCurves.glslfx
================================================================

GPU-accelerated Antialiased Dashed Stroked Polylines
Copyright (C) 2013 Nicolas P. Rougier. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL NICOLAS P. ROUGIER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are
those of the authors and should not be interpreted as representing official
policies, either expressed or implied, of Nicolas P. Rougier.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#usda 1.0

(
upAxis = "Y"
doc = """This layer represents the various geometric forms that curves
may be used to represent."""
)

def "MyPattern" (
prepend apiSchemas = ["DashDotPatternAPI"]
)
{
uniform float patternPeriod = 15
uniform float2[] pattern = [(0, 10)]
}

def Xform "Linear" {
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, 9, 0)
def Scope "Ribbons"{
def DashDotLines "StyledPolyline1" (
inherits = [</MyPattern>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, 0, 0)

uniform bool screenSpacePattern = false
uniform token startCapType = "round"
uniform token endCapType = "round"

int[] curveVertexCounts = [3, 4, 4]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0), (10, 70, 0), (10, 80, 0), (0, 90, 0), (-10, 100, 0)]
float[] widths = [5] (interpolation = "constant")
color3f[] primvars:displayColor = [(1, 0, 0)]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#usda 1.0

(
upAxis = "Y"
doc = """This layer represents the various geometric forms that curves
may be used to represent."""
)

def "MyPattern" (
prepend apiSchemas = ["DashDotPatternAPI"]
)
{
uniform float patternPeriod = 15
uniform float2[] pattern = [(0, 10)]
}

def Xform "Linear" {
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, 9, 0)
def Scope "Ribbons"{
def DashDotLines "StyledPolyline1" (
inherits = [</MyPattern>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, 0, 0)

uniform token implType = "simpleDashDot"
uniform bool screenSpacePattern = false
uniform token startCapType = "round"
uniform token endCapType = "round"

int[] curveVertexCounts = [3, 4, 4]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0), (10, 70, 0), (10, 80, 0), (0, 90, 0), (-10, 100, 0)]
float[] widths = [1] (interpolation = "constant")
color3f[] primvars:displayColor = [(1, 0, 0)]
}
}
}
165 changes: 165 additions & 0 deletions extras/usd/examples/usdGeomExamples/dashDotLines_ScreenSpace.usda
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
#usda 1.0

(
upAxis = "Y"
doc = """This layer represents the various geometric forms that curves
may be used to represent."""
)


def Xform "Linear" {
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, 9, 0)
def Scope "Ribbons"{
def DashDotLines "StyledPolyline1" (
inherits = [</Pattern1>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, 0, 0)

uniform bool screenSpacePattern = true
uniform token startCapType = "round"
uniform token endCapType = "round"
uniform float patternScale = 2.5
int[] curveVertexCounts = [7]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
float[] widths = [5] (interpolation = "constant")
color3f[] primvars:displayColor = [(1, 0, 0)]
}
def DashDotLines "StyledPolyline2" (
inherits = [</Pattern1>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (30, 0, 0)

uniform bool screenSpacePattern = true
uniform token startCapType = "square"
uniform token endCapType = "triangle"
uniform float patternScale = 3.5
int[] curveVertexCounts = [7]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
float[] widths = [8] (interpolation = "constant")
color3f[] primvars:displayColor = [(1, 0, 0)]
}
def DashDotLines "StyledPolyline3" (
inherits = [</Pattern1>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (60, 0, 0)

uniform bool screenSpacePattern = true
uniform token startCapType = "round"
uniform token endCapType = "triangle"
uniform float patternScale = 5
int[] curveVertexCounts = [7]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
float[] widths = [3] (interpolation = "constant")
color3f[] primvars:displayColor = [(1, 0, 0)]
}
def DashDotLines "StyledPolyline4" (
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (90, 0, 0)

uniform token startCapType = "round"
uniform token endCapType = "round"
int[] curveVertexCounts = [7]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
float[] widths = [8] (interpolation = "constant")
color3f[] primvars:displayColor = [(1, 0, 0)]
}

def DashDotLines "StyledPolyline5" (
inherits = [</Pattern1>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, -80, 0)

uniform bool screenSpacePattern = true
uniform token startCapType = "round"
uniform token endCapType = "round"
uniform float patternScale = 2.5
int[] curveVertexCounts = [7]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
float[] widths = [5] (interpolation = "constant")
color3f[] primvars:displayColor = [(0, 1, 0)]
}
def DashDotLines "StyledPolyline6" (
inherits = [</Pattern2>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (30, -80, 0)

uniform bool screenSpacePattern = true
uniform token startCapType = "round"
uniform token endCapType = "round"
uniform float patternScale = 2.5
int[] curveVertexCounts = [7]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
float[] widths = [5] (interpolation = "constant")
color3f[] primvars:displayColor = [(0, 1, 0)]
}
def DashDotLines "StyledPolyline7" (
inherits = [</Pattern3>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (60, -80, 0)

uniform bool screenSpacePattern = true
uniform token startCapType = "round"
uniform token endCapType = "round"
uniform float patternScale = 5
int[] curveVertexCounts = [7]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
float[] widths = [5] (interpolation = "constant")
color3f[] primvars:displayColor = [(0, 1, 0)]
}
def DashDotLines "StyledPolyline8" (
inherits = [</Pattern4>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (90, -80, 0)

uniform bool screenSpacePattern = true
uniform token startCapType = "round"
uniform token endCapType = "round"
uniform float patternScale = 5
int[] curveVertexCounts = [7]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
float[] widths = [5] (interpolation = "constant")
color3f[] primvars:displayColor = [(0, 1, 0)]
}
}
}

def "Pattern1" (
prepend apiSchemas = ["DashDotPatternAPI"]
)
{
uniform float patternPeriod = 40
uniform float2[] pattern = [(0, 25), (5, 5)]
}

def "Pattern2" (
prepend apiSchemas = ["DashDotPatternAPI"]
)
{
uniform float patternPeriod = 20
uniform float2[] pattern = [(0, 10), (5, 0)]
}

def "Pattern3" (
prepend apiSchemas = ["DashDotPatternAPI"]
)
{
uniform float patternPeriod = 15
uniform float2[] pattern = [(0, 10)]
}

def "Pattern4" (
prepend apiSchemas = ["DashDotPatternAPI"]
)
{
uniform float patternPeriod = 5
uniform float2[] pattern = [(0, 0)]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#usda 1.0

(
upAxis = "Y"
doc = """This layer represents the various geometric forms that curves
may be used to represent."""
)

def "MyPattern" (
prepend apiSchemas = ["DashDotPatternAPI"]
)
{
uniform float patternPeriod = 15
uniform float2[] pattern = [(0, 10)]
}

def Xform "Linear" {
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, 9, 0)
def Scope "Ribbons"{
def DashDotLines "StyledPolyline1" (
prepend inherits = [</MyPattern>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, 0, 0)

uniform bool screenSpacePattern = true
uniform token startCapType = "round"
uniform token endCapType = "round"
uniform float patternScale = 5

int[] curveVertexCounts = [3, 4, 4]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0), (10, 70, 0), (10, 80, 0), (0, 90, 0), (-10, 100, 0)]
float[] widths = [5] (interpolation = "constant")
color3f[] primvars:displayColor = [(1, 0, 0)]
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#usda 1.0

(
upAxis = "Y"
doc = """This layer represents the various geometric forms that curves
may be used to represent."""
)

def "MyPattern" (
prepend apiSchemas = ["DashDotPatternAPI"]
)
{
uniform float patternPeriod = 15
uniform float2[] pattern = [(0, 10)]
}

def Xform "Linear" {
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, 9, 0)
def Scope "Ribbons"{
def DashDotLines "StyledPolyline1" (
inherits = [</MyPattern>]
){
uniform token[] xformOpOrder = ["xformOp:translate"]
float3 xformOp:translate = (0, 0, 0)

uniform bool screenSpacePattern = true
uniform token startCapType = "round"
uniform token endCapType = "round"
uniform float patternScale = 5

int[] curveVertexCounts = [3, 4, 4]
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0), (10, 70, 0), (10, 80, 0), (0, 90, 0), (-10, 100, 0)]
float[] widths = [5] (interpolation = "constant")
color3f[] primvars:displayColor = [(1, 0, 0), (1, 0, 0), (0, 0, 1), (1, 1, 0), (1, 0 ,1), (0, 1, 1), (0, 1, 0), (0, 0, 1), (1, 1, 0), (1, 0 ,1), (0, 1, 1)](interpolation = "vertex")
}
}
}
Loading
Loading