Hello SirVer:

Id like to move the 0.5 * line_width invariant in tesselate_line_strip out of 
the loop.
(I tend to optimize all the code I see)

--
Hasi50


> Am 05.02.2016 um 20:19 schrieb SirVer <sir...@gmx.de>:
> 
> If you want to play around a little bit more, go for it. I will not code 
> anymore tonight, so I will only clean this up tomorrow anyways. There are the 
> parameters you can play with
> 
> - In the last commit I removed the code that draws the circles to connect to 
> lines, so lines are not connected anymore. You might bring that back.
> - the fuzzyness of the lines is defined through this line:
>  float alpha = pow(cos(var_color.a * PI / 2), 1.5);
> the corners of each line quad are alpha = 1, opposite are -1, so the shader 
> gets a linear interpolated value between -1 and 1 across the line. This 
> function turns that into a non linear function that defines the falloff. You 
> can replace that or tweak the 1.5 to different values you like.
> - glDepthFunction(GL_LEQUAL) vs glDepthFunction(GL_LESS) defines overdraw 
> behavior for overlapping lines. If two lines overlap, it defines if the 
> second lines pixel are drawn over the first line pixels or not - that 
> obviously only makes a difference if the pixel is partially transparent. 
> - The thickness of the lines in the plot area. 
> 
> It might help to bring back this line in graphic:
> 
> screen_->draw_line_strip(
>               {FloatPoint(20, 300), FloatPoint(700, 500), FloatPoint(250, 
> 50)}, RGBColor(255, 0, 0), 30, LineDrawMode::kAntialiased);
> 
> directly before:
>       RenderQueue::instance().draw(screen_->width(), screen_->height());
> 
> It draws a big fat line across your screen that is much bigger than any we 
> use in Widelands, but it gives you a feeling for your parameters. 
> 
> It is fun to play around with that, but I did it too much now. Maybe you find 
> better parameters. 
> -- 
> https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
> Your team Widelands Developers is subscribed to branch 
> lp:~widelands-dev/widelands/beautiful_correct_lines.
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~widelands-dev
> Post to     : widelands-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~widelands-dev
> More help   : https://help.launchpad.net/ListHelp


-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to