x


Basic Shader questions for transparent textures on mobile devices

Hello, I will be the first to admit that I don't know much when it comes to shaders, or texturing in general. I'm curious what you all think is the most efficient way to approach rendering simple transparent textures on mobile devices with zero lighting/effects. How should the source images be prepared? Saved out as transparent PNGs, PSDs with alpha channels? All I am looking to do is display the texture simply as it was drawn.

Right now I am using built-in mobile shaders but I am getting some hiccups when running on an iPhone 4 and after profiling, the only things taking up a lot of time are rendering related.

more ▼

asked Aug 10 '12 at 02:30 PM

helios gravatar image

helios
125 13 15 20

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first
more ▼

answered Aug 10 '12 at 05:59 PM

Meltdown gravatar image

Meltdown
5.6k 18 25 49

Thanks for the response. Do you know if there is a performance difference if I use an additive shader vs alpha blend one?

Aug 10 '12 at 06:48 PM helios

Since you're developing for mobile devices such as iOS, an additive shader is usually more efficient than an alpha blended one.

Aug 10 '12 at 07:44 PM Meltdown
(comments are locked)
10|3000 characters needed characters left

Try this one from the forums with the changes Jessy suggests, likely to be about as fast as you can get.

As for the images I would flatten the layers and save as a transparent PNG.

more ▼

answered Aug 10 '12 at 08:28 PM

lozzaaa gravatar image

lozzaaa
1 1 2

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1953
x271
x244

asked: Aug 10 '12 at 02:30 PM

Seen: 2156 times

Last Updated: Aug 10 '12 at 08:28 PM