Search found 702 matches

by Ref
Mon May 21, 2012 6:46 pm
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 541633

Re: Share a Shader!

Sorry! Problem with zip was a typo.
Vrid's PixelEffect works fine (once tx is shanged to tc).
Would still like to be ale to change only a portion of the image so need to know how to index image2 data.
by Ref
Mon May 21, 2012 4:56 pm
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 541633

Re: Share a Shader!

Thanks for the responses!
Nixola - using Windows SENG TO which works fine for jpg - so was surprised when it didn't do png.
Vrid - exactly what I wanted to know! will try your code.
Thanks all1
by Ref
Mon May 21, 2012 3:37 pm
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 541633

Re: Share a Shader!

Still trying to figure out PixelEffect. Got a morphing effect to almost work. morph = gr.newPixelEffect [[ extern float tran; vec4 effect(vec4 color, Image texture, vec2 tc, vec2 pc ) { vec4 pixel = Texel( texture, tc ); {pixel.r = tran*pixel.r;} {pixel.g = tran*pixel.g;} {pixel.b = tran*pixel.b;} {...
by Ref
Sat May 12, 2012 3:13 pm
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 541633

Re: Share a Shader!

Guess I didn't really appreciate how setPixelEffect works.
Ran into another gotchU.
Coordinate system (y axis) appears to be inverted when effect is applied to an 'image' rather than to a 'canvas'.
Such is life.
Have to do some more reading.
by Ref
Sat May 12, 2012 1:22 pm
Forum: Support and Development
Topic: Attempt to index local 'self' (a nil value)
Replies: 6
Views: 6396

Re: Attempt to index local 'self' (a nil value)

Not sure what's the issue is here. local gui = {} function gui:load() self.__checkboxes = {} self.__labels = {} self.__buttons = {} self.__drawables = {'checkboxes', 'labels', 'buttons'} self.__clickables = {'checkboxes', 'buttons'} end function gui:erase() self:load() end gui:erase() print(gui.__dr...
by Ref
Wed May 09, 2012 7:36 pm
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 541633

Re: Share a Shader!

If nothing else, persistent.
Another shader.
One thing you can say about shaders is they are counter-intuitive.
Have to reverse your logic.
Think this shader is for a glass ball but (as dumb as it might seem) not sure what a glass ball should look like.
Appreciate feedback.
Best,
by Ref
Wed May 09, 2012 12:52 am
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 541633

Re: Share a Shader!

A simple shader.
Image just a place holder.
Would like a transparent ball shader.
Anyone have one?
by Ref
Tue May 08, 2012 2:43 am
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 541633

Re: Share a Shader!

Thank you vrid.
Should have found this info on the WIKI but still quite new here.
Best
by Ref
Mon May 07, 2012 3:17 pm
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 541633

Re: Share a Shader!

Thanks bartbes. Appears I was just screwing up some of the syntax. Have to do some more thinking as to how to avoid the conditionals. Tried using sequential application of shaders but got different results then with conditionals. Dumb question - where is a source for functions available in GSGL lang...
by Ref
Sun May 06, 2012 8:20 pm
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 541633

Re: Share a Shader!

Quick question on conditional statements in GLSL.
How do you put multiple conditions in a single 'if' statement (not familiar with C++).
Can get nested ifs to work but not multi-conditional (see attachment).