![]() So should basically every shader include some simple Vignette code? Probably.įloat2 distance_xy = texcoord - float2(0.5f, 0.5f) ĭistance_xy *= float2((BUFFER_RCP_HEIGHT / BUFFER_RCP_WIDTH), BUFFER_ASPECT_RATIO) Ĭonst float dist= dot(distance_xy, distance_xy) ![]() The most low-hanging fruity example of this is merging the Vignette shader with virtually any other shader - you basically get Vignette for free because after the tap it's only like 4 math instructions, saving like 0.170 ms from the total shader time over using a separate vignette shader. The most obvious reason for this is by eliminating texture lookups. Yeah, the performance increase can be very significant by merging shaders. I meant to come back earlier and answer my own question, but I just didn't.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |