Created
April 2, 2015 08:34
-
-
Save pyalot/05f5007b6826342621a8 to your computer and use it in GitHub Desktop.
state assembly test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
createState: (framebuffer, code) -> | |
@fw.state | |
cull: 'back' | |
shader: [ | |
fs.open('/pbr-tools.shader') | |
fs.open('tools.shader') | |
"""essl | |
fragment: | |
void main(){ | |
#{code} | |
} | |
""" | |
] | |
depthTest: true | |
vertexbuffer: @vertexbuffer | |
constructor: (@fw) -> | |
@foo = @createState null, '''essl | |
vec3 albedo = getAlbedo(); | |
vec3 excident = shade(albedo, 1.0, 0.0)+albedo*0.25; | |
write(excident*1.5); | |
''' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment