Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] Diff of /trunk/sml3d/src/shaders/shader-sig.sml
ViewVC logotype

Diff of /trunk/sml3d/src/shaders/shader-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1235, Mon Sep 19 18:20:03 2011 UTC revision 1236, Thu Sep 22 19:30:01 2011 UTC
# Line 16  Line 16 
16      type mat3f = Matrix3f.mat3      type mat3f = Matrix3f.mat3
17      type mat4f = Matrix4f.mat4      type mat4f = Matrix4f.mat4
18    
19      type blendMode      type blend_mode
20    
21      type shadeStyle      type shade_style
22    
23          type transform2D          type transform2D
24          type transform3D          type transform3D
# Line 53  Line 53 
53      (*fragvar is result of any operation performed on a varying or other fragvar*)      (*fragvar is result of any operation performed on a varying or other fragvar*)
54      (*output can be any specified expression*)      (*output can be any specified expression*)
55    
56      type 'a sampler2D      type 'a sampler2DVariable
57      type 'a sampler3D      type 'a sampler3DVariable
58    
59      type attrKind      type attr_kind
60      val ConstAttr: attrKind      val ConstAttr: attr_kind
61          val InterpAttr:  attrKind          val InterpAttr:  attr_kind
62    
63      type binding (*in vs out*)      type binding (*in vs out*)
64      val In: binding      val In: binding
# Line 71  Line 71 
71      val uniform: 'a ty * string -> 'a uniformVariable      val uniform: 'a ty * string -> 'a uniformVariable
72    
73      (*prior to glsl 1.3 'output' creates attributes, after it will use new 'in' variable bindings*)      (*prior to glsl 1.3 'output' creates attributes, after it will use new 'in' variable bindings*)
74      val attribute: 'a ty * string * attrKind -> 'a attributeVariable      val attribute: 'a ty * string * attr_kind -> 'a attributeVariable
75    
76      (*prior to glsl 1.3 'output' maps to gl_fragColor, after it will handle new 'out' variable bindings -- allowing for multiple outputs, though I'm not clear on the practical applications of having multiple output bindings in a single render pass*)      (*prior to glsl 1.3 'output' maps to gl_fragColor, after it will handle new 'out' variable bindings -- allowing for multiple outputs, though I'm not clear on the practical applications of having multiple output bindings in a single render pass*)
77      val output: 'a ty * string * outputKind -> 'a outputVariable      val output: 'a ty * string * outputKind -> 'a outputVariable
78    
79      val smplr2D: 'a ty * string * binding -> 'a sampler2D      val sampler2D: 'a ty * string * binding -> 'a sampler2DVariable
80      val smplr3D: 'a ty * string * binding -> 'a sampler3D      val sampler3D: 'a ty * string * binding -> 'a sampler3DVariable
81    
82      (*********************************      (*********************************
83          *               light constructors               *          *               light constructors               *
# Line 133  Line 133 
133          val uniform: 'a uniformVariable -> 'a exp          val uniform: 'a uniformVariable -> 'a exp
134          val attribute: 'a attributeVariable -> 'a exp          val attribute: 'a attributeVariable -> 'a exp
135          val bindToOutput: 'a outputVariable * 'a exp -> unit          val bindToOutput: 'a outputVariable * 'a exp -> unit
136                  val sample2d: 'a sampler2D * vec2f exp -> 'a exp                  val sample2D: 'a sampler2DVariable * vec2f exp -> 'a exp
137                  val sample3d: 'a sampler3D * vec3f exp -> 'a exp                  val sample3D: 'a sampler3DVariable * vec3f exp -> 'a exp
138    
139          (* swizzle support *)          (* swizzle support *)
140          val X: int          val X: int
# Line 151  Line 151 
151          val vec4: (float exp * float exp * float exp * float exp) -> vec4f exp          val vec4: (float exp * float exp * float exp * float exp) -> vec4f exp
152          val color3: (float exp * float exp * float exp) -> color3f exp          val color3: (float exp * float exp * float exp) -> color3f exp
153          val color4: (float exp * float exp * float exp * float exp) -> color4f exp          val color4: (float exp * float exp * float exp * float exp) -> color4f exp
154          val vec2Select: (vec2f exp * int) -> float exp          val selectVec2: (vec2f exp * int) -> float exp
155          val vec2Select2: (vec2f exp * int * int) -> vec2f exp          val select2Vec2: (vec2f exp * int * int) -> vec2f exp
156          val vec3Select: (vec3f exp * int) -> float exp          val selectVec3: (vec3f exp * int) -> float exp
157          val vec3Select2: (vec3f exp * int * int) -> vec2f exp          val select2Vec3: (vec3f exp * int * int) -> vec2f exp
158          val vec3Select3: (vec3f exp * int * int * int) -> vec3f exp          val select3Vec3: (vec3f exp * int * int * int) -> vec3f exp
159          val vec4Select: (vec4f exp * int) -> float exp          val selectVec4: (vec4f exp * int) -> float exp
160          val vec4Select2: (vec4f exp * int * int) -> vec2f exp          val select2Vec4: (vec4f exp * int * int) -> vec2f exp
161          val vec4Select3: (vec4f exp * int * int * int) -> vec3f exp          val select3Vec4: (vec4f exp * int * int * int) -> vec3f exp
162          val vec4Select4: (vec4f exp * int * int * int * int) -> vec4f exp          val select4Vec4: (vec4f exp * int * int * int * int) -> vec4f exp
163          val color3Select: (color3f exp * int) -> float exp          val selectColor3: (color3f exp * int) -> float exp
164          val color3Select3: (color3f exp * int * int * int) -> color3f exp          val select3Color3: (color3f exp * int * int * int) -> color3f exp
165          val color4Select: (color4f exp * int) -> float exp          val selectColor4: (color4f exp * int) -> float exp
166          val color4Select3: (color4f exp * int * int * int) -> color3f exp          val select3Color4: (color4f exp * int * int * int) -> color3f exp
167          val color4Select4: (color4f exp * int * int * int * int) -> color4f exp          val select4Color4: (color4f exp * int * int * int * int) -> color4f exp
168    
169          val clampToColor: float exp -> float exp (*clamps value to range [0.0, 1.0] *)          val clampToColor: float exp -> float exp (*clamps value to range [0.0, 1.0] *)
170          val vec3ToColor3: vec3f exp -> color3f exp (* clamps all values to range [0.0, 1.0]*)          val vec3ToColor3: vec3f exp -> color3f exp (* clamps all values to range [0.0, 1.0]*)
# Line 254  Line 254 
254          ******  mid level ******          ******  mid level ******
255          val getEmissiveColor: material -> color4f exp          val getEmissiveColor: material -> color4f exp
256          val getGlobalAmbientColor: (vec4f exp * material) -> color4f exp          val getGlobalAmbientColor: (vec4f exp * material) -> color4f exp
257          val blendColors: (color4f exp * blendMode * color4f exp * blendMode) -> color4f exp          val blendColors: (color4f exp * blend_mode * color4f exp * blend_mode) -> color4f exp
258          val shadeWithOneLight: (light * material * shadeStyle) -> color4f exp          val shadeWithOneLight: (light * material * shade_style) -> color4f exp
259          val shadeWithLightList: (light list * material * shadeStyle) -> color4f exp          val shadeWithLightList: (light list * material * shade_style) -> color4f exp
260          val preMultiplyAlpha: (color4f exp * color4f exp) -> color3f exp          val preMultiplyAlpha: (color4f exp * color4f exp) -> color3f exp
261          *          *
262          ******  high level ******          ******  high level ******
263          val basicShade: (vec4f exp * light list * material * shadeStyle) -> color3f exp          val basicShade: (vec4f exp * light list * material * shade_style) -> color3f exp
264          *          *
265          *)          *)
266      end      end

Legend:
Removed from v.1235  
changed lines
  Added in v.1236

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0