Search found 15 matches

by ghurk
Fri Jul 14, 2017 6:55 pm
Forum: Libraries and Tools
Topic: Textured Polygons for All!
Replies: 144
Views: 102381

Re: Textured Polygons for All!

Ok. so i tried to implement only the transformations support now. I will try to post new file, able to be drawn through draw() later when/if it is completed. Please try out and comment if transformations work properly in all cases. also excuse the simplified functions. Not sure if its going to be mo...
by ghurk
Thu Jul 13, 2017 11:20 pm
Forum: Libraries and Tools
Topic: Textured Polygons for All!
Replies: 144
Views: 102381

Re: Textured Polygons for All!

actually i still have 3 steps left so not ready to post here yet. 1. decipher the data and extract+apply both rotation and skew in pixel shader. 2. use mesh vertex data instead sending them as extras for pixel shader. at this point it will be able to save at least the amount u need to perform additi...
by ghurk
Wed Jul 12, 2017 4:53 pm
Forum: Support and Development
Topic: Is it possible to access the draw() position in a shader?
Replies: 5
Views: 4312

Re: Is it possible to access the draw() position in a shader?

TransformMatrix[0][0] contains vec2 scale data of both draw() scale and love.graphics.scale() already multiplied vec2( TransformMatrix[3][0], TransformMatrix[3][1] ) contains x and y of both draw() x, y and love.graphics.translate() already multiplied, gonna figure out rest now. TransformMatrix[3] s...
by ghurk
Wed Jul 12, 2017 2:29 pm
Forum: Libraries and Tools
Topic: Textured Polygons for All!
Replies: 144
Views: 102381

Re: Textured Polygons for All!

Anyone know how are data stored in TransformMatrix? modified the shader so that i am able to draw like this: texture.setVertices( v[1],v[2],v[3],v[4] ) --same as mesh vertices now texture.preload(true) love.graphics.translate(120, 100) love.graphics.draw( mesh, 0, 200, 0, 1, 1) texture.preload(false...
by ghurk
Wed Jul 12, 2017 12:44 am
Forum: Support and Development
Topic: Profiler
Replies: 14
Views: 8525

Re: Profiler

Id like to know how much cpu certain functions consume and check if current optimisation steps really bear fruit, or which are more efficient without always having to build further testing code to see results. Id like to oppose what you said about "not being relevant to gamer" and "no...
by ghurk
Sun Jul 09, 2017 7:03 pm
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 539529

Re: Share a Shader!

quick remake for love2d v.0.10.2: shaderCustom = love.graphics.newShader [[ extern float soft = 0.3; extern float threshold = 0.3; vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords ) { float f = soft/2.0; float a = threshold - f; float b = threshold + f; vec4 tx = Texel...
by ghurk
Sun Jul 09, 2017 6:03 pm
Forum: Support and Development
Topic: slopes and collisions
Replies: 2
Views: 3120

Re: slopes and collisions

Im usually using this collision check based on some math article which link i dont have anymore. px, py = x, y --point coordinates rec = { {x,y}; {x,y}; {x,y}; {x,y} }; --rectangle function checkA ( x0, y0, x1, y1, x2, y2 ) --check point against line if ( x1*y2 - y1*x2 - x0*y2 + y0*x2 + x0*y1 - y0*x...
by ghurk
Sun Jul 09, 2017 5:11 pm
Forum: Support and Development
Topic: Sharpen Shader Inquiry
Replies: 3
Views: 3962

Re: Sharpen Shader Inquiry

ok, played around a lil. based the shader on standard Love2d one, so should be working properly with color settings etc. Didnt try on meshes yet. adjustable sharpness level, and also applies to alpha of texture. can send modification which wont touch alpha. also id like if some1 could try it out in ...
by ghurk
Sun Jul 09, 2017 3:23 pm
Forum: Support and Development
Topic: Sharpen Shader Inquiry
Replies: 3
Views: 3962

Re: Sharpen Shader Inquiry

if u look properly at what this shader does, you can basically just use pretty ugly sharpen in photoshop. Final quality on zoom is meh. It looks "better" due to higher contrast, which can be achieved by manual pre-sharpening of graphic data used. My tips: 1. Photoshop your source data righ...
by ghurk
Wed Jun 28, 2017 9:15 pm
Forum: Libraries and Tools
Topic: Textured Polygons for All!
Replies: 144
Views: 102381

Re: Textured Polygons for All!

i can think of 2 possible scenarios. 1st: compile the mesh "q" + compile all textures in shader (in order, results of new textures will create a layer on top of previous ones and overwrite pixel data) and then draw batch as one mesh with one texture. 2nd: output multiple modified textures ...