Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

In Stage3d the only way to configure the sampler seems to be through agal. How do we deal we that ? #23

Open
wighawag opened this Issue · 3 comments

4 participants

@wighawag

Hi,

First of all thanks for this nice tool. coding in glsl make far much sense :)

In Stage3d the only way to configure the sampler seems to be through agal. How do we deal we that ?

For example, let say I want the sampler to have the nearest filter instead of the linear filter.
In agal I add "nearest" instead of "linear" in the sampler options but since here the agal is generated from glsl, how can I specify to use nearest filter. Should we add this to the json config so that if you wanted to use the glsl on its own (in a native app) the native app could read that json and figure out what filter (or other sampler option) to apply?

Or maybe there a way to do it in glsl?

Thanks

@jonathanrpace

There's a feature coming in a future version of Flash Player you could use to configure all the sampler options per texture.

Context3D.setSamplerStateAt( index:int, wrapMode:String, filter:String, mipFilter:String )

There was a beta of the AIR 3.6 SDK with a preview of this (and other) features. But the link I used to get it no longer works . . .

@Georg123

We've solved this problem by patching the compiled byte code. Can't post the method because of copyright issues but it's less than 100 lines long. For a description of the AGAL opcodes see
http://help.adobe.com/en_US/as3/dev/WSd6a006f2eb1dc31e-310b95831324724ec56-8000.html

But good to know that the next flash player will have the setSamplerStateAt method.

@daoshengmu

How can I handle the ATF textures? I think I need to use "tex ft0.xyzw, v0.xyyy, fs0 " in agal. However, glsl2agal seems not yet support atf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.