Highlighted

RectangleTexture and repeat in fragment shader

Explorer ,
Dec 29, 2015

Copy link to clipboard

Copied

This sample is worked http://pastebin.com/B0eN8EGj

....

var texture:* = context3D.createTexture(bitmapData.width, bitmapData.height, Context3DTextureFormat.BGRA, false);
texture.uploadFromBitmapData(bitmapData);
context3D.setTextureAt(0, texture);

...

fragmentShader.assemble(Context3DProgramType.FRAGMENT,
   "tex ft1, v0, fs0 <2d, repeat, linear>\n"+

   "mov oc, ft1"
);

.....



If creat RectangleTexture:

var texture:* = context3D.createRectangleTexture(bitmapData.width, bitmapData.height, Context3DTextureFormat.BGRA, false);
texture.uploadFromBitmapData(bitmapData);
context3D.setTextureAt(0, texture);

app does not display anything.


How do I create a repeating RectangleTexture ?

TOPICS
Development

Views

123

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

RectangleTexture and repeat in fragment shader

Explorer ,
Dec 29, 2015

Copy link to clipboard

Copied

This sample is worked http://pastebin.com/B0eN8EGj

....

var texture:* = context3D.createTexture(bitmapData.width, bitmapData.height, Context3DTextureFormat.BGRA, false);
texture.uploadFromBitmapData(bitmapData);
context3D.setTextureAt(0, texture);

...

fragmentShader.assemble(Context3DProgramType.FRAGMENT,
   "tex ft1, v0, fs0 <2d, repeat, linear>\n"+

   "mov oc, ft1"
);

.....



If creat RectangleTexture:

var texture:* = context3D.createRectangleTexture(bitmapData.width, bitmapData.height, Context3DTextureFormat.BGRA, false);
texture.uploadFromBitmapData(bitmapData);
context3D.setTextureAt(0, texture);

app does not display anything.


How do I create a repeating RectangleTexture ?

TOPICS
Development

Views

124

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 29, 2015 0

Have something to add?

Join the conversation