Away3D 4.0 Beta ::: Post Effects ::: What is the texture?

Software: Away3D 4.x

redefy, Newbie
Posted: 07 April 2012 06:24 PM   Total Posts: 8

Hello! Sorry for the Google Translate ....
I tried to port the filters on the engine Yogurt3D Away3D. Almost happened. Faced with only one unknown to me the moment:
What makes Away3D texture that it behaves?

 

 

   

redefy, Newbie
Posted: 07 April 2012 06:26 PM   Total Posts: 8   [ # 1 ]

It feels as if the texture is rendered in a scene that just cropped.
Textures of both engines in the same scene are rendered. What’s in the top, in the lower example. (1024 x 512)
But Away3D behaves as it is necessary only if the size of the viewport are also equal to 1024x512.
What those who have thought about this? How can this be fixed a?
Thank you all in advance.

 

   

redefy, Newbie
Posted: 07 April 2012 07:32 PM   Total Posts: 8   [ # 2 ]

All right. I found a place from which it depends ...

RTTBufferManager.as

public function set viewWidth(value : int) : void
{
    if (value == _viewWidth) return;
    _viewWidth = value;

    _buffersInvalid = true;

    _textureWidth = TextureUtils.getBestPowerOf2(_viewWidth);
    if (_textureWidth > _viewWidth) _textureWidth >>= 1; //fix
 
    if (_textureWidth > _viewWidth) {
      _renderToTextureRect.x = uint((_textureWidth-_viewWidth)*.5);
      _renderToTextureRect.width = _viewWidth;
    } else {
      _renderToTextureRect.x = 0;
      _renderToTextureRect.height = _textureHeight;
    }

  dispatchEvent(new Event(Event.RESIZE));
}

Maybe there is a better solution? Suggestions?

 

   

redefy, Newbie
Posted: 08 April 2012 09:46 AM   Total Posts: 8   [ # 3 ]

Have you any idea?

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X