add usd-21-11-win64_py39

This commit is contained in:
Sébastien Albert committed 2021-12-07 17:43:55 +01:00
1 parent 41d23e71ba
commit ba5e1f7e67
15684 files changed
+3069957

No files matched your search

@@ -0,0 +1,508 @@
-- glslfx version 0.1
//
// Copyright 2018 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
-- configuration
{
"techniques": {
"default": {
"displacementShader": {
"source": [ "Preview.Displacement" ]
},
"surfaceShader": {
"source": [ "Preview.LightStructures",
"Preview.Lighting",
"Preview.LightIntegration",
"Preview.NormalMapping",
"Preview.Surface" ]
}
}
}
}
-- glsl Preview.Displacement
vec4
displacementShader(int index, vec4 Peye, vec3 Neye, vec4 patchCoord)
{
// Calculate scalar displacement.
float texDisplacement = HdGet_displacement(index).x;
return Peye + vec4(Neye*texDisplacement, 0);
}
-- glsl Preview.Surface
vec4
surfaceShader(vec4 Peye, vec3 Neye, vec4 color, vec4 patchCoord)
{
float clearcoatAmount = HdGet_clearcoat().x;
float clearcoatRoughness = HdGet_clearcoatRoughness().x;
vec3 diffuseColor = HdGet_diffuseColor().xyz;
vec3 emissiveColor = HdGet_emissiveColor().xyz;
float ior = HdGet_ior().x;
float metallic = HdGet_metallic().x;
float occlusion = HdGet_occlusion().x;
float opacity = HdGet_opacity().x;
float opacityThreshold = HdGet_opacityThreshold().x;
float roughness = HdGet_roughness().x;
vec3 specularColor = HdGet_specularColor().xyz;
bool useSpecularWorkflow = (HdGet_useSpecularWorkflow().x == 1);
vec3 clearcoatColor = vec3(1.0);
float specularAmount = 1.0;
#ifdef HD_MATERIAL_TAG_MASKED
if (opacity < opacityThreshold) {
discard;
}
opacity = 1.0;
#endif
// Selection highlighting.
vec4 colorAndOpacity = vec4(diffuseColor, opacity);
diffuseColor = ApplyColorOverrides(colorAndOpacity).rgb;
// Pre-multiply diffuse color by opacity if not done so already
#ifndef diffuseColor_IS_PREMULTIPLIED
diffuseColor *= opacity;
#endif
// Evaluate all lights.
vec3 c = evaluateLights(
emissiveColor,
diffuseColor,
useSpecularWorkflow,
ior,
metallic,
specularAmount,
specularColor,
roughness,
clearcoatAmount,
clearcoatColor,
clearcoatRoughness,
occlusion,
Peye,
perturbFragmentNormal(Peye.xyz, Neye));
return vec4(c, colorAndOpacity.a);
}
-- glsl Preview.LightStructures
struct LightingContributions
{
vec3 diffuse;
vec3 specular;
};
-- glsl Preview.Lighting
#define PI 3.1415
#define EPSILON 0.001
float
SchlickFresnel(float EdotH)
{
return pow(max(0.0, 1.0 - EdotH), 5.0);
}
float
NormalDistribution(float specularRoughness, float NdotH)
{
float alpha = specularRoughness * specularRoughness;
float alpha2 = alpha * alpha;
float NdotH2 = NdotH * NdotH;
float DDenom = (NdotH2 * (alpha2 - 1.0)) + 1.0;
DDenom *= DDenom;
DDenom *= PI;
float D = (alpha2 + EPSILON) / DDenom;
return D;
}
float
Geometric(
float specularRoughness,
float NdotL,
float NdotE,
float NdotH,
float EdotH)
{
float alpha = specularRoughness * specularRoughness;
float k = alpha * 0.5;
float G = NdotE / (NdotE * (1.0 - k) + k);
G *= NdotL / (NdotL * (1.0 - k) + k);
return G;
}
vec3
evaluateDirectDiffuse()
{
return vec3(1.0 / PI);
}
vec3
evaluateDirectSpecular(
vec3 specularColorF0,
vec3 specularColorF90,
float specularRoughness,
float fresnel,
float NdotL,
float NdotE,
float NdotH,
float EdotH)
{
vec3 F = mix(specularColorF0, specularColorF90, fresnel);
float D = NormalDistribution(specularRoughness, NdotH);
float G = Geometric(specularRoughness, NdotL, NdotE, NdotH, EdotH);
vec3 RNum = F * G * D;
float RDenom = 4.0f * NdotL * NdotE + EPSILON;
return RNum / RDenom;
}
LightingContributions
evaluateLight(
vec3 diffuseColor,
bool useSpecularWorkflow,
float ior,
float metallic,
float specularAmount,
vec3 specularColor,
float specularRoughness,
float clearcoatAmount,
vec3 clearcoatColor,
float clearcoatRoughness,
float occlusion,
float NdotL,
float NdotE,
float NdotH,
float EdotH,
vec3 lightDiffuseIrradiance,
vec3 lightSpecularIrradiance)
{
specularRoughness = max(0.001, specularRoughness);
clearcoatRoughness = max(0.001, clearcoatRoughness);
float fresnel = SchlickFresnel(EdotH);
// Evaluate diffuse
vec3 d = diffuseColor * evaluateDirectDiffuse();
// Evaluate specular first lobe
vec3 s1 = vec3(0.0);
const float R = (1.0 - ior) / (1.0 + ior);
if (specularAmount > 0.0) {
vec3 F0 = specularColor;
vec3 F90 = vec3(1.0);
if (!useSpecularWorkflow) {
vec3 specColor = mix(vec3(1.0), diffuseColor, metallic);
F0 = mix(R * R * specColor, specColor, metallic);
F90 = specColor;
// For metallic workflows, pure metals have no diffuse
d *= 1.0 - metallic;
}
s1 = specularAmount * evaluateDirectSpecular(
F0, // Specular color 0
F90, // Specular color 90
specularRoughness, // Roughness
fresnel, // Fresnel
NdotL, NdotE, NdotH, EdotH); // Dot products needed for lights
// Adjust the diffuse so glazing angles have less diffuse
d *= (1.0 - mix(F0, F90, fresnel));
}
// Evaluate clearcoat
vec3 s2 = vec3(0.0);
if (clearcoatAmount > 0.0) {
s2 = clearcoatAmount * evaluateDirectSpecular(
R * R * clearcoatColor, // Clearcoat color 0
clearcoatColor, // Clearcoat color 90
clearcoatRoughness, // Roughness
fresnel, // Fresnel
NdotL, NdotE, NdotH, EdotH); // Dot products needed for lights
}
LightingContributions lightingContrib;
lightingContrib.diffuse =
occlusion * NdotL * d * lightDiffuseIrradiance;
lightingContrib.specular =
occlusion * NdotL * (s1 + s2) * lightSpecularIrradiance;
return lightingContrib;
}
-- glsl Preview.LightIntegration
vec2 projectToLatLong(vec3 sample3D)
{
// project spherical coord onto latitude-longitude map with
// latitude: +y == pi/2 and longitude: +z == 0, +x == pi/2
vec2 coord = vec2((atan(sample3D.z, sample3D.x) + 0.5 * PI) / (2.0 * PI),
acos(sample3D.y) / PI);
return coord;
}
mat4 GetDomeLightTransform(mat4 worldToLightTransform)
{
// transform from view space to light space
mat4 worldToViewInverse = GetWorldToViewInverseMatrix();
return worldToLightTransform * worldToViewInverse;
}
vec3
evaluateIndirectLighting(
vec3 diffuseColor,
vec3 specularColor,
vec3 Neye,
vec3 Reye,
float NdotE,
float EdotH,
float ior,
float metallic,
float occlusion,
float roughness,
bool useSpecularWorkflow,
float clearcoatAmount,
vec3 clearcoatColor,
float clearcoatRoughness,
mat4 worldToLightTransform)
{
vec3 indirect = vec3(0.0);
#ifdef HD_HAS_domeLightIrradiance
vec3 F0 = specularColor;
vec3 F90 = vec3(1.0);
vec3 d = diffuseColor;
const float R = (1.0 - ior) / (1.0 + ior);
if (!useSpecularWorkflow) {
vec3 specColor = mix(vec3(1.0), diffuseColor, metallic);
F0 = mix(R * R * specColor, specColor, metallic);
F90 = specColor;
// For metallic workflows, pure metals have no diffuse
d *= 1.0 - metallic;
}
// Adjust the diffuse so glazing angles have less diffuse
float fresnel = SchlickFresnel(EdotH);
vec3 F = mix(F0, F90, fresnel);
d *= (1.0 - F);
mat4 transformationMatrix = GetDomeLightTransform(worldToLightTransform);
// Diffuse Component
vec3 dir = normalize((transformationMatrix * vec4(Neye,0.0)).xyz);
vec2 coord = projectToLatLong(dir);
vec3 diffuse = HdGet_domeLightIrradiance(coord).rgb;
// Specular Component
const float MAX_REFLECTION_LOD =
textureQueryLevels(HdGetSampler_domeLightPrefilter());
float lod = roughness * MAX_REFLECTION_LOD;
vec3 Rdir = normalize((transformationMatrix * vec4(Reye,0.0)).xyz);
vec2 Rcoord = projectToLatLong(Rdir);
vec3 prefilter = textureLod(HdGetSampler_domeLightPrefilter(),
Rcoord, lod).rgb;
vec2 brdf = HdGet_domeLightBRDF(vec2(NdotE, roughness)).rg;
vec3 specular = prefilter * (F * brdf.x + brdf.y);
// Clearcoat Component
vec3 clearcoat = vec3(0.0);
if (clearcoatAmount > 0.0) {
const vec3 clearcoatF = clearcoatAmount * mix(
R * R * clearcoatColor, // Clearcoat F0
clearcoatColor, // Clearcoat F90
fresnel);
lod = clearcoatRoughness * MAX_REFLECTION_LOD;
prefilter = textureLod(HdGetSampler_domeLightPrefilter(),
Rcoord, lod).rgb;
clearcoat = prefilter * (clearcoatF * brdf.x + brdf.y);
}
// Indirect Lighting
indirect = (d * diffuse + specular + clearcoat) * occlusion;
#endif
return indirect;
}
vec3
evaluateLights(
vec3 emissiveColor,
vec3 diffuseColor,
bool useSpecularWorkflow,
float ior,
float metallic,
float specularAmount,
vec3 specularColor,
float specularRoughness,
float clearcoatAmount,
vec3 clearcoatColor,
float clearcoatRoughness,
float occlusion,
vec4 Peye,
vec3 Neye)
{
vec3 n = Neye;
vec3 e = normalize(-Peye.xyz);
float NdotE = max(0.0, dot(n, e));
vec3 Reye = reflect(-e, n);
vec3 directLight = vec3(0.0);
vec3 indirectLight = vec3(0.0);
#if NUM_LIGHTS > 0
for (int i = 0; i < NUM_LIGHTS; ++i) {
// Calculate necessary vector information for lighting
vec4 Plight = (lightSource[i].isIndirectLight)
? vec4(0,0,0,1)
: lightSource[i].position;
vec3 l = (Plight.w == 0.0)
? normalize(Plight.xyz)
: normalize(Plight - Peye).xyz;
vec3 h = normalize(e + l);
float NdotL = max(0.0, dot(n, l));
float NdotH = max(0.0, dot(n, h));
float EdotH = max(0.0, dot(e, h));
// Calculate light intensity
float atten = lightDistanceAttenuation(Peye, i);
float spot = lightSpotAttenuation(l, i);
// Calculate the shadow factor
float shadow = 1.0;
#if USE_SHADOWS
shadow = (lightSource[i].hasShadow) ?
shadowing(/*lightIndex=*/i, Peye) : 1.0;
#endif
float intensity = atten * spot * shadow;
vec3 lightDiffuseIrradiance = intensity * lightSource[i].diffuse.rgb;
vec3 lightSpecularIrradiance = intensity * lightSource[i].specular.rgb;
LightingContributions lightingContrib = evaluateLight(
diffuseColor,
useSpecularWorkflow,
ior,
metallic,
specularAmount,
specularColor,
specularRoughness,
clearcoatAmount,
clearcoatColor,
clearcoatRoughness,
occlusion,
NdotL,
NdotE,
NdotH,
EdotH,
lightDiffuseIrradiance,
lightSpecularIrradiance);
// calculate the indirect light (DomeLight)
if (lightSource[i].isIndirectLight) {
indirectLight = evaluateIndirectLighting(diffuseColor,
specularColor, Neye, Reye, NdotE,
EdotH, ior, metallic, occlusion,
specularRoughness, useSpecularWorkflow,
clearcoatAmount, clearcoatColor,
clearcoatRoughness,
lightSource[i].worldToLightTransform);
}
// all other light sources contribute to the direct lighting
else {
directLight += (lightingContrib.diffuse + lightingContrib.specular);
}
}
#endif
return (emissiveColor + directLight + indirectLight);
}
-- glsl Preview.NormalMapping
vec3
perturbFragmentNormal(vec3 P, vec3 N)
{
#ifdef HD_HAS_COORD_normal
// Calculation of TBN matrix and terminology based on "Surface
// Gradient-Based Bump Mapping Framework" (2020)
vec3 Nt = normalize(HdGet_normal().xyz);
vec2 st = HdGetCoord_normal().st;
// Get screen space derivatives of position
vec3 dPdx = dFdx(P);
vec3 dPdy = dFdy(P);
// Ensure position derivatives are perpendicular to N
vec3 sigmaX = dPdx - dot(dPdx, N) * N;
vec3 sigmaY = dPdy - dot(dPdy, N) * N;
float flipSign = dot(dPdy, cross(N, dPdx)) < 0 ? -1 : 1;
// Get screen space derivatives of st
vec2 dSTdx = dFdx(st);
vec2 dSTdy = dFdy(st);
// Get determinant and determinant sign of st matrix
float det = dot(dSTdx, vec2(dSTdy.y, -dSTdy.x));
float signDet = det < 0 ? -1 : 1;
// Get first column of inv st matrix
// Don't divide by det, but scale by its sign
vec2 invC0 = signDet * vec2(dSTdy.y, -dSTdx.y);
vec3 T = sigmaX * invC0.x + sigmaY * invC0.y;
if (abs(det) > 0) {
T = normalize(T);
}
vec3 B = (signDet * flipSign) * cross(N, T);
mat3 TBN = mat3(T, B, N);
return normalize(TBN * Nt);
#endif
return N;
}
@@ -0,0 +1,35 @@
-- glslfx version 0.1
//
// Copyright 2018 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
-- configuration
{
"techniques": {
"default": {
}
}
}
-- This file is intentionally empty.
@@ -0,0 +1,450 @@
#usda 1.0
def Shader "UsdPreviewSurface" (
doc = "Preview surface specification"
)
{
uniform token info:id = "UsdPreviewSurface"
uniform token info:implementationSource = "sourceAsset"
# XXX: This doesn't resolve if it's defined as a search path.
# Might require special resolver configuration, to include the resources
# directory.
uniform asset info:glslfx:sourceAsset = @./previewSurface.glslfx@
# Outputs
token outputs:surface (
sdrMetadata = {
string renderType = "terminal surface"
}
)
token outputs:displacement (
sdrMetadata = {
string renderType = "terminal displacement"
}
)
# Inputs
color3f inputs:diffuseColor = (0.18, 0.18, 0.18) (
doc = """Parameter used as diffuseColor when using the specular
workflow, when using metallic workflow this is interpreted
as albedo."""
)
color3f inputs:emissiveColor = (0.0, 0.0, 0.0) (
doc = """Emissive component."""
)
int inputs:useSpecularWorkflow = 0 (
connectability = "interfaceOnly"
doc = """This node can fundamentally operate in two modes :
Specular workflow where you provide a texture/value to the
"specularColor" input. Or, Metallic workflow where you
provide a texture/value to the "metallic" input."""
)
color3f inputs:specularColor = (0.0, 0.0, 0.0) (
doc = """Used only in the specular workflow.
Specular color to be used.
This is the color at 0 incidence. Edge color is assumed white.
Transition between the two colors according to Schlick fresnel
approximation."""
)
float inputs:metallic = 0.0 (
doc = """Used only in the metalness workflow.
1 for metallic surfaces and 0 for non-metallic.
- If metallic is 1, then both F0 (reflectivity at 0 degree
incidence) and edge F90 reflectivity will simply be the Albedo.
- If metallic is 0, then Albedo is ignored in the calculation of F0
and F90; F0 is derived from ior via ( (1-ior)/(1+ior) )^2 and F90 is
white.
In between, we interpolate."""
)
float inputs:roughness = 0.5 (
doc = """Roughness for the specular lobe. The value ranges from 0 to 1,
which goes from a perfectly specular surface at 0.0 to maximum roughness
of the specular lobe. This value is usually squared before use with a
GGX or Beckmann lobe."""
)
float inputs:clearcoat = 0.0 (
doc = """Second specular lobe amount. The color is white."""
)
float inputs:clearcoatRoughness = 0.01 (
doc = """Roughness for the second specular lobe."""
)
float inputs:opacity = 1.0 (
doc = """Opacity of the material."""
)
float inputs:opacityThreshold = 0.0 (
connectability = "interfaceOnly"
doc = """Threshold used to determine opacity values that will be
considered fully transparent. A value of 0.0 indicates that no masking
is applied to the opacity input, while a value greater than 0.0 indicates
that rendering of the surface is limited to the areas where the opacity
is greater or equal to that value. Note that when opacityThreshold is
greater than zero, the opacity values less than the opacityThreshold will
not be rendered, and the opacity values greater than or equal to the
opacityThreshold will be fully visible."""
)
float inputs:ior = 1.5 (
doc = """Index of Refraction to be used for translucent objects."""
)
normal3f inputs:normal = (0.0, 0.0, 1.0) (
doc = """Expects normal in tangent space [(-1,-1,-1), (1,1,1)]
This means your texture reader implementation should provide
data to this node that is properly scaled and ready
to be consumed as a tangent space normal."""
)
float inputs:displacement = 0.0 (
doc = """Displacement in the direction of the normal. """
)
float inputs:occlusion = 1.0 (
doc = """Occlusion signal. This provides extra information about the
occlusion of different parts of the mesh that this material is applied
to. Occlusion only makes sense as a surface-varying signal, and
pathtracers will likely choose to ignore it. An occlusion value of 0.0
means the surface point is fully occluded by other parts of the surface,
and a value of 1.0 means the surface point is completely unoccluded by
other parts of the surface. """
)
}
def Shader "UsdUVTexture" (
doc = """Texture Node Specification represents a node that can be used to
read UV textures, including tiled textures such as Mari UDIM's.
Reads from a texture file and outputs one or more values. If the texture has
8 bits per component, [0, 255] values will first be converted to floating
point in the range [0, 1] and then any transformations (bias, scale)
indicated are applied. Otherwise any indicated transformation (bias,
scale) is just applied. If a single-channel texture is fed into a
UsdUVTexture, the r, g, and b components of the rgb output will repeat the
channel's value, while the single 'a' output will be set to 1.0. If a
two-channel texture is fed into a UsdUVTexture, the r, g, and b components
of the rgb output will repeat the first channel's value, while the single
'a' output will be set to the second channel's value. If a three-channel
texture is fed into a UsdUVTexture, the r, g, and b components of the rgb
outputs will contain the assigned texture channel's value, while the single
'a' output will be set to 1.0.
"""
sdrMetadata = {
token role = "texture"
}
)
{
uniform token info:id = "UsdUVTexture"
uniform token info:implementationSource = "sourceAsset"
uniform asset info:glslfx:sourceAsset = @./uvTexture.glslfx@
asset inputs:file = @@ (
connectability = "interfaceOnly"
doc = """Path to the texture this node uses."""
)
float2 inputs:st = (0.0, 0.0) (
doc = """This input provides the texture coordinates. It is usually
connected to a (primvar) node that will provide the texture
coords."""
)
token inputs:wrapS = "useMetadata" (
allowedTokens = ["black", "clamp", "repeat", "mirror", "useMetadata"]
connectability = "interfaceOnly"
doc = """<options> black, clamp, repeat, mirror, useMetadata."""
)
token inputs:wrapT = "useMetadata" (
allowedTokens = ["black", "clamp", "repeat", "mirror", "useMetadata"]
connectability = "interfaceOnly"
doc = """<options> black, clamp, repeat, mirror, useMetadata."""
)
float4 inputs:fallback = (0.0, 0.0, 0.0, 1.0) (
doc = """Fallback value to be used when no texture is connected."""
sdrMetadata = {
token defaultInput = "1"
}
)
float4 inputs:scale = (1.0, 1.0, 1.0, 1.0) (
connectability = "interfaceOnly"
doc = """Scale to be applied to all components of the texture.
value * scale + bias"""
)
float4 inputs:bias = (0.0, 0.0, 0.0, 0.0) (
connectability = "interfaceOnly"
doc = """Bias to be applied to all components of the texture.
value * scale + bias)"""
)
token inputs:sourceColorSpace = "auto" (
connectability = "interfaceOnly"
allowedTokens = ["raw", "sRGB", "auto"]
doc = """<options> raw, sRGB, auto. Flag indicating the color
space in which the source texture is encoded."""
)
float outputs:r (
doc = "Outputs the red channel."
sdrMetadata = {
token swizzle = "x"
}
)
float outputs:g (
doc = "Outputs the green channel."
sdrMetadata = {
token swizzle = "y"
}
)
float outputs:b (
doc = "Outputs the blue channnel."
sdrMetadata = {
token swizzle = "z"
}
)
float outputs:a (
doc = "Outputs the alpha channnel."
sdrMetadata = {
token swizzle = "w"
}
)
float3 outputs:rgb (
doc = "Outputs the red, green and blue channels."
sdrMetadata = {
token swizzle = "xyz"
}
)
}
class "UsdPrimvarReader" (
sdrMetadata = {
token role = "primvar"
}
)
{
uniform token info:implementationSource = "sourceAsset"
uniform asset info:glslfx:sourceAsset = @./primvarReader.glslfx@
string inputs:varname = "" (
connectability = "interfaceOnly"
doc = """Name of the primvar to be fetched from the geometry."""
sdrMetadata = {
token primvarProperty = "1"
}
)
}
def Shader "UsdPrimvarReader_float" (
inherits = </UsdPrimvarReader>
)
{
uniform token info:id = "UsdPrimvarReader_float"
float inputs:fallback = 0.0 (
doc = """Fallback value to be returned when fetch failed."""
sdrMetadata = {
token defaultInput = "1"
}
)
float outputs:result
}
def Shader "UsdPrimvarReader_float2" (
inherits = </UsdPrimvarReader>
)
{
uniform token info:id = "UsdPrimvarReader_float2"
float2 inputs:fallback = (0.0, 0.0) (
doc = """Fallback value to be returned when fetch failed."""
sdrMetadata = {
token defaultInput = "1"
}
)
float2 outputs:result
}
def Shader "UsdPrimvarReader_float3" (
inherits = </UsdPrimvarReader>
)
{
uniform token info:id = "UsdPrimvarReader_float3"
float3 inputs:fallback = (0.0, 0.0, 0.0) (
doc = """Fallback value to be returned when fetch failed."""
sdrMetadata = {
token defaultInput = "1"
}
)
float3 outputs:result
}
def Shader "UsdPrimvarReader_float4" (
inherits = </UsdPrimvarReader>
)
{
uniform token info:id = "UsdPrimvarReader_float4"
float4 inputs:fallback = (0.0, 0.0, 0.0, 0.0) (
doc = """Fallback value to be returned when fetch failed."""
sdrMetadata = {
token defaultInput = "1"
}
)
float4 outputs:result
}
def Shader "UsdPrimvarReader_int" (
inherits = </UsdPrimvarReader>
)
{
uniform token info:id = "UsdPrimvarReader_int"
int inputs:fallback = 0 (
doc = """Fallback value to be returned when fetch failed."""
sdrMetadata = {
token defaultInput = "1"
}
)
int outputs:result
}
def Shader "UsdPrimvarReader_string" (
inherits = </UsdPrimvarReader>
)
{
uniform token info:id = "UsdPrimvarReader_string"
string inputs:fallback = "" (
doc = """Fallback value to be returned when fetch failed."""
sdrMetadata = {
token defaultInput = "1"
}
)
string outputs:result
}
def Shader "UsdPrimvarReader_normal" (
inherits = </UsdPrimvarReader>
)
{
uniform token info:id = "UsdPrimvarReader_normal"
normal3f inputs:fallback = (0.0, 0.0, 0.0) (
doc = """Fallback value to be returned when fetch failed."""
sdrMetadata = {
token defaultInput = "1"
}
)
normal3f outputs:result
}
def Shader "UsdPrimvarReader_point" (
inherits = </UsdPrimvarReader>
)
{
uniform token info:id = "UsdPrimvarReader_point"
point3f inputs:fallback = (0.0, 0.0, 0.0) (
doc = """Fallback value to be returned when fetch failed."""
sdrMetadata = {
token defaultInput = "1"
}
)
point3f outputs:result
}
def Shader "UsdPrimvarReader_vector" (
inherits = </UsdPrimvarReader>
)
{
uniform token info:id = "UsdPrimvarReader_vector"
vector3f inputs:fallback = (0.0, 0.0, 0.0) (
doc = """Fallback value to be returned when fetch failed."""
sdrMetadata = {
token defaultInput = "1"
}
)
vector3f outputs:result
}
def Shader "UsdPrimvarReader_matrix" (
inherits = </UsdPrimvarReader>
)
{
uniform token info:id = "UsdPrimvarReader_matrix"
matrix4d inputs:fallback = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ) (
doc = """Fallback value to be returned when fetch failed."""
sdrMetadata = {
token defaultInput = "1"
}
)
matrix4d outputs:result
}
def Shader "UsdTransform2d" (
doc = """Transform 2d represents a node that can be used to
transform 2d data (for instance, texture coordinates).
The node applies the following transformation :
in * scale * rotate + translation"""
sdrMetadata = {
token role = "math"
}
)
{
uniform token info:id = "UsdTransform2d"
uniform token info:implementationSource = "sourceAsset"
uniform asset info:glslfx:sourceAsset = @./transform2d.glslfx@
float2 inputs:in = (0.0, 0.0) (
doc = """This input provides the data. It is usually
connected to a UsdPrimvarReader_float2 that
will provide the data."""
)
float inputs:rotation = 0.0 (
connectability = "interfaceOnly"
doc = """Counter-clockwise rotation in degrees around the origin to be applied
to all components of the data."""
)
float2 inputs:scale = (1.0, 1.0) (
connectability = "interfaceOnly"
doc = """Scale around the origin to be applied to all components of the data."""
)
float2 inputs:translation = (0.0, 0.0) (
connectability = "interfaceOnly"
doc = """Translation to be applied to all components of the data."""
)
float2 outputs:result (
doc = "Outputs transformed float2 values."
)
}
@@ -0,0 +1,35 @@
-- glslfx version 0.1
//
// Copyright 2020 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
-- configuration
{
"techniques": {
"default": {
}
}
}
-- This file is intentionally empty.
@@ -0,0 +1,35 @@
-- glslfx version 0.1
//
// Copyright 2018 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
-- configuration
{
"techniques": {
"default": {
}
}
}
-- This file is intentionally empty.