• surface.DrawTexturedRect Blur
    7 replies, posted
When I try to draw this .png, it slightly blurs it (along with all the others) [img]http://puu.sh/2GmFl/df677e34bf.png[/img] [lua] surface.SetDrawColor( Color( 255, 255, 255, 255) ); surface.SetMaterial( matHeadBack ) surface.DrawTexturedRect( iX, iY + 64, 64, 52 );[/lua] iX and iY are non-floats aswell, so it's not like it's being drawn at some point .333 or anything. [img]http://puu.sh/2GmJn/8ae054b5f9.png[/img] If I draw using surface.DrawTexturedRectRotated, then it's perfectly fine. using TexturedRectRotated: [img]http://puu.sh/2GmOd/34d52ae801.png[/img] [lua] surface.SetDrawColor( Color( 255, 255, 255, 255) ); surface.SetMaterial( matHeadBack ) -- Adjusting the position by half the image, since Rotated centers it. surface.DrawTexturedRectRotated( iX + 32, iY + 26 + 64, 64, 52, 0 );[/lua]
I've tried using PushFilterMag/Min but they don't have any good effect to it.
Have you experimented with the various words? [code]Material( name, words )[/code] Supported words are ( as of 153 ): vertexlitgeneric unlitgeneric nocull alphatest mips noclamp smooth
I wish that parameter was documented better, if I could figure out a way to toggle the point sample flag. (OR just get this function to not use some filter on it when it doesn't even need it.)
[del]Can I see your .vmt?[/del] I just realized you are using .png Also, it's not words, it's called Shaders.
[QUOTE=Robotboy655;40416748][del]Can I see your .vmt?[/del] I just realized you are using .png Also, it's not words, it's called Shaders.[/QUOTE] Yeah I've been thinking of just using .vmt, since then I can use the Point Sample flag. But I don't want to go through the hassle just to figure out there was an easy fix and then have a cluttered materials folder.
[QUOTE=Robotboy655;40416748][del]Can I see your .vmt?[/del] I just realized you are using .png Also, it's not words, it's called Shaders.[/QUOTE] A) VertexLitGeneric and UnlitGeneric are the only shaders in the list - the rest are paramters. B) The source for the function declares them that way - I copied the declaration.
Alright well thanks for clarifying but I'm still stuck here. I'm not sure exactly what DrawTexturedRect is doing but could someone who can look into it do that por favor?
Sorry, you need to Log In to post a reply to this thread.