"Vision without action is a daydream;
action without vision is a nightmare."
- Japanese proverb
More pages: 1 ... 11 ... 21 ... 31 ... 41 ... 51 ... 61 ... 71 ... 81 ... 85 86 87 88 89 90 91 92 93 94 95 ... 101 ... 111 ... 121 ... 131 ... 141 ... 151 ... 161 ... 171 ... 181 ... 191 ... 201 ... 211 ... 221 ... 231 ... 241 ... 251 ... 261 ... 271 ... 281 ... 291 ... 301 ... 311 ... 321 ... 331 ... 341 ... 351 ... 361 ... 371 ... 381 ... 391 ... 401 ... 411 ... 421 ... 431 ... 438
Query Failedlim
Friday, May 3, 2013

gv me money

Matthew
Tuesday, April 23, 2013

I used my credit card to purchase more gold in your game I couldn't remember my Googel password so I couldn't make the purchase Im looking for someone to answer a commentsimple ?!! for me about the privacy policy your game has to secure my information I have looked and read for almost an hour and have not found anything that tells me hey this is safe for you to use your credit card I understand that im on a comment board but I have gone every where to get answers on this serious matter if any one can respond to help me know where to look where it states that it says that this is by law a secure game website for the use of private info that would be GREAT THANKS

Giacomo
Sunday, April 21, 2013

Hi Humus, i'm from Rome!following your works since looong time! you did a fantastic job with cubemaps of my city

CeeJay.dk
Friday, April 12, 2013

-x * x * (2 * x - 3) ran just as fast as x * x * (3 - 2 * x)

CeeJay.dk
Friday, April 12, 2013

-x * x * (2 * x - 3) ran just as fast as x * x * (3 - 2 * x)

CeeJay.dk
Thursday, April 11, 2013

Awesome tips. I've already begun using some of them.

Some tips of my own:
If you want to do smoothstep(0,1,x) , then instead do x * x * (3 - 2 * x) . It will be slightly faster.
Hmm thinking of it now, I think -x * x * (2 * x - 3) might be slightly faster but I will need to get home so I can verify this with GPU Shaderanalyzer.

Also you often need to compare the length of a vector to a value and often people do pythagoras:
if (sqrt( dot(vector,vector) ) < threshold)
Instead try:
if (dot(vector,vector) < (threshold * threshold))
because it's faster do the square of the threshold (especially if it's a constant) than do a sqrt()

Humus
Wednesday, April 10, 2013

Sometimes it improves readability, sometimes makes it worse, depending on what's most intuitive for the situation. Sometimes I clarify with a comment, or just put the original or more naive expression in a comment. Sometimes it's just a matter of rewriting the shader to be more readable. For instance,

const float start = 0.7f;
const float slope = 3.2f;
return (x - start) * slope;

turns into:

const float start = 0.7f;
const float slope = 3.2f;
const float bias = -start * slope;
return x * slope + bias;

Dan Y
Tuesday, April 9, 2013

Great stuff, thanks for posting these. Some of the transformations done on simple equations to get them into optimized forms cut down on "readability". Do you ever find yourself putting the original naive implementation in comments near the optimized versions, or is it just something people need to get used to?

More pages: 1 ... 11 ... 21 ... 31 ... 41 ... 51 ... 61 ... 71 ... 81 ... 85 86 87 88 89 90 91 92 93 94 95 ... 101 ... 111 ... 121 ... 131 ... 141 ... 151 ... 161 ... 171 ... 181 ... 191 ... 201 ... 211 ... 221 ... 231 ... 241 ... 251 ... 261 ... 271 ... 281 ... 291 ... 301 ... 311 ... 321 ... 331 ... 341 ... 351 ... 361 ... 371 ... 381 ... 391 ... 401 ... 411 ... 421 ... 431 ... 438