Please use english language
It is currently 23 Oct 2017, 22:27

All times are UTC





Post new topic Reply to topic  [ 53 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: 17 Jun 2015, 01:49 
Offline

Joined: 17 Jun 2015, 01:46
Posts: 1
Hey can I PLZ PLZ PLZ get this effect.txt???


Top
 Profile  
 
Tomoko
PostPosted: 18 Jun 2015, 19:08 
Offline

Joined: 12 Feb 2013, 22:38
Posts: 40
Location: Britain
@Blendahead
Read through the post, there's a link.

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


Top
 Profile  
 
PostPosted: 18 Jun 2015, 20:26 
Offline

Joined: 23 Dec 2013, 16:04
Posts: 21
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 :)


Top
 Profile  
 
PostPosted: 19 Jun 2015, 02:32 
Offline
User avatar

Joined: 19 Feb 2015, 07:25
Posts: 14
Thank you for sharing your work, JezuesFitzroy, and look forward to trying the new version when it's finished!


Top
 Profile  
 
PostPosted: 25 Jun 2015, 14:44 
Offline

Joined: 23 Dec 2013, 16:04
Posts: 21
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.


Top
 Profile  
 
PostPosted: 25 Jun 2015, 14:53 
Offline
*sensei*
User avatar

Joined: 30 Jan 2012, 13:18
Posts: 464
What do you mean? Do you want to run it at lower resolution or?


Top
 Profile  
 
PostPosted: 25 Jun 2015, 15:02 
Offline

Joined: 23 Dec 2013, 16:04
Posts: 21
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


Top
 Profile  
 
PostPosted: 25 Jun 2015, 15:50 
Offline
*sensei*
User avatar

Joined: 30 Jan 2012, 13:18
Posts: 464
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:
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:

int samples = 4;
if(ScreenSize.x > 1024 && < 1920) samples = 5;
if(ScreenSize.x >= 1920) samples = 6;


or something like that. Does that not work?


Top
 Profile  
 
PostPosted: 25 Jun 2015, 16:38 
Offline

Joined: 23 Dec 2013, 16:04
Posts: 21
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


Top
 Profile  
 
PostPosted: 25 Jun 2015, 18:01 
Offline
*sensei*

Joined: 05 Apr 2014, 10:29
Posts: 496
Location: Taiwan
I use this to increase DOF performance, but how much will it gain is purely based on what lies in the loop.

Code:
for(int i=0; i < 6 && i < sample ; i++)
 {
loops;
};

_________________
Intel Xeon L5639 6C12T @3.96GHz // Gigabyte ga-x58a-ud3r// MSI GTX680 4G// 24G RAM
Flickr
YouTube


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 53 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group