WIP Paintyness n things

share shaders here
  • Author
  • Message
Offline
Posts: 1
Joined: 17 Jun 2015, 01:46

Re: WIP Paintyness n things

Hey can I PLZ PLZ PLZ get this effect.txt???

Offline
Posts: 40
Joined: 12 Feb 2013, 22:38
Location: Britain

Re: WIP Paintyness n things

@Blendahead
Read through the post, there's a link.

@JezuesFitzroy
Not sure about actual play, but great for just arty fun.
Image
Image

Offline
Posts: 21
Joined: 23 Dec 2013, 16:04

Re: WIP Paintyness n things

Dazaster - Hey, some confusion has occurred. That's an old link to my first attempt at writing a pixel shader.
The new images are done with one I just wrote from scratch which is better, faster and more playabler.
Will post the new one soon just adding another little tweak :)

Offline
User avatar
Posts: 14
Joined: 19 Feb 2015, 07:25

Re: WIP Paintyness n things

Thank you for sharing your work, JezuesFitzroy, and look forward to trying the new version when it's finished!

Offline
Posts: 21
Joined: 23 Dec 2013, 16:04

Re: WIP Paintyness n things

Is there anyway to test the screen res at compile time?
I want to set the length of a loop depending on it, and doing so with ScreenSize.x just stops it working.
I tried an breaking out of the loop early using an if but don't get any performance gain doing it that way.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 530
Joined: 30 Jan 2012, 13:18

Re: WIP Paintyness n things

What do you mean? Do you want to run it at lower resolution or?

Offline
Posts: 21
Joined: 23 Dec 2013, 16:04

Re: WIP Paintyness n things

so that at 1920 it tests 6 pixels across but at 1280 it only tests 4
otherwise I'm testing 2 more samples than I really need to at the lower res

Offline
User avatar
*blah-blah-blah maniac*
Posts: 530
Joined: 30 Jan 2012, 13:18

Re: WIP Paintyness n things

Ah. Hm I'd say use a function that uses ScreenSize.x (the horizontal screen res) and the (rounded) output is 6 for 1920 and 4 for 1024.

I just use a linear equation given the two points (1024|4) and (1920|6), so the function used for your preferences would be like

Code: Select all

int samples = round(0.00223 * ScreenSize.x + 1.714);
That would give 5.9956 for 1920 and 3.99752 for 1024 so rounding these values gives the desired stuff.

Although simple if/else statements should work.

Code: Select all


int samples = 4;
if(ScreenSize.x > 1024 && < 1920) samples = 5;
if(ScreenSize.x >= 1920) samples = 6;
or something like that. Does that not work?

Offline
Posts: 21
Joined: 23 Dec 2013, 16:04

Re: WIP Paintyness n things

alas I had tried such already. As soon as you then do something like this it fails

for(int i=0; i < samples ; i++) {
do stuff;
};

I also tried

for(int i=0; i < 6 ; i++) {
do stuff;
if (i >= samples) {
i = 6;
};
};

this runs but the frame rate remains the same as letting the loop finish

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: WIP Paintyness n things

I use this to increase DOF performance, but how much will it gain is purely based on what lies in the loop.

Code: Select all

for(int i=0; i < 6 && i < sample ; i++)
 {
loops;
};
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube
Post Reply