Filters and ATF (Error 3763)

25 views
Skip to first unread message

Aldvin Bek

unread,
Nov 21, 2016, 10:21:04 AM11/21/16
to Genome2D
When I use ATF textures with GFilters, I catch runtime error "#3763 Sampler 0 binds a texture that that does not match the read mode specified in AGAL."
To solve this problem I insert dxt5 parameter to fragmentCode. In order to avoid copying the class code, I use this quick, dirty and not a reliable hack.

public class GBlurPassFilterATF extends GBlurPassFilter {
public function GBlurPassFilterATF(p_blur:int = 0, p_direction:int = 0) {
super(p_blur,p_direction);
while (super.fragmentCode.indexOf('linear,mipnone') >= 0) super.fragmentCode = super.fragmentCode.replace('linear,mipnone','linear,dxt5,mipnone');
}
}

Perhaps it would be correct to pass texture_type(atf_type) parameter to filter constructor?
Reply all
Reply to author
Forward
0 new messages