Logo by yv3 - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. April 26, 2024, 03:43:09 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: 1 ... 6 7 [8] 9 10 ... 16   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: updating of DE-Raytracer  (Read 38433 times)
Description: adding features in DE-raytracer: volumetric light, kaliset3d, clouds...
0 Members and 2 Guests are viewing this topic.
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #105 on: December 15, 2015, 04:50:48 PM »

Fast and ugly solution attached. smiley
It works! Thank you very much!!!  smiley  A Beer Cup A Beer Cup A Beer Cup
I really do not know a programming language. I tried to write everything that came to mind.

upd.: I'm probably asking too much.. Can you add rotation?  help
« Last Edit: December 15, 2015, 05:39:00 PM by Crist-JRoger » Logged

knighty
Fractal Iambus
***
Posts: 819


« Reply #106 on: December 16, 2015, 02:27:49 PM »

Grrrr!
 grin

* DE-kn2t.zip (9.77 KB - downloaded 93 times.)
Logged
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #107 on: December 16, 2015, 10:04:17 PM »

 thank you post swing Repeating Zooming Self-Silimilar Thumb Up, by Craig


Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #108 on: December 17, 2015, 02:56:00 AM »

@Crist-JRoger nice smiley
@knighty  thanks sign

a request for input from some of you GLSL coders...

I intend on making a float array of values available to the buffershader from the GL depthbuffer and before I commit to anything I would like some input from some of the fragment specialists.

Could "light from camera pos" calculations be moved to buffershader.frag? I think freeing up some space in the DE.frag might let it compile on older cards with smaller code caches.
Could some shadow or AO stuff go there too?
Is it worth the effort to do this, make depthbuffer from DE available to the fragment that handles "Post" tab huh?

this is where I'm at, can be 2 types of values in a 2D float array...
1> GL values used for spline path occlusion
2> 1.0/totalDist from camera (user can modify this to be whatever they need to pass to the buffershader code)

Should it be a vec4?

Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
knighty
Fractal Iambus
***
Posts: 819


« Reply #109 on: December 17, 2015, 03:21:13 PM »

If it's only depth, it shouldn't be vec4 I guess... My OpenGL knowledge stops at version 1.1.  cheesy

Having the depth buffer is welcome as a starting point.  grin . Having multiple target rendering buffers would be awesome.
With depth buffer some effects like "cheap" DoF and SSAO could already be achieved (syntopia already did them IIRC). I don't think camera light should be moved even if it is possible.

For a low spec GPU, just don't use volumetric fog and IQ's clouds. Also, remember that loops may be unrolled by by the compiler. In that case, instruction limit is attained very fast: Imagine you do 5 reflexions, 300 ray marching steps and 30 iterations in DE computation. That's without using other stuff. It also helps a lot to lock variables like reflexion count, hard shadows and raymarching steps.

Using GLSL alone, it is quite difficult to write a fully featured ray tracer as Crit-JRooger would like to have evil grin. A necessary feature that is not available in GLSL is function pointer (actually there is something like that but it is a new feature). With a scripting language (Qt have one) many things could become possible. That is not easy to do though.
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #110 on: December 17, 2015, 03:34:44 PM »

tnx K smiley

I was thinking vec4 so programmer can use xyzw as they see fit, say normal xyz and depth w ? or...

btw QScript is implemented cheesy
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #111 on: December 19, 2015, 10:27:20 AM »

When i use a lot of 'features' Fragmentarium says me: "Go away, your GPU is too weak, give me something easier for compile  tease" In logs it sounds: "Too much instructions"
I guess my questions are stupid, but still:
Is it possible to combine these instructions to reduce their amount?
Is it necessary to write a version of the language?  I tried to write #version 110, 120 ... 330 and got errors

110 and 120
Code:
Could not create fragment shader: 0(197) : error C7011: implicit cast from "float" to "vec2"
0(197) : error C7011: implicit cast from "float" to "vec2"
0(197) : error C7011: implicit cast from "float" to "vec2"
0(197) : error C7011: implicit cast from "float" to "vec2"
0(788) : error C7623: implicit narrowing of type from "vec3" to "float"

330
Code:
Could not create fragment shader: 0(133) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(134) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(135) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(136) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(137) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(138) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(147) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(148) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(149) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(150) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(151) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(197) : error C7011: implicit cast from "float" to "vec2"
0(197) : error C7011: implicit cast from "float" to "vec2"
0(197) : error C7011: implicit cast from "float" to "vec2"
0(197) : error C7011: implicit cast from "float" to "vec2"
0(256) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(351) : warning C7533: global variable gl_FragColor is deprecated after version 120
0(788) : error C7623: implicit narrowing of type from "vec3" to "float"


Test. Floor replased on IQ-terrain+heightmap and PseudoKleinianMenger_03. On my gpu works without coloring code. Too much instructions with any other adding to code.


Logged

knighty
Fractal Iambus
***
Posts: 819


« Reply #112 on: December 19, 2015, 04:16:11 PM »

First question: I don't really now. Try locking some parameters (like number of reflexions, shadow... etc.) and don't activate features that you don't use...
Second question: by default Nvidia compiler gives you all it's features. It is also very forgiving about the standards so you may end up with shaders that only work on Nvidia GC. Using #version tells the compiler to conform exactly to the version of GLSL that you are targeting.
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #113 on: December 19, 2015, 08:30:44 PM »

When i use a lot of 'features' Fragmentarium says me: "Go away, your GPU is too weak, give me something easier for compile  tease" In logs it sounds: "Too much instructions"

110 and 120
Code:
Could not create fragment shader: 0(197) : error C7011: implicit cast from "float" to "vec2"
0(197) : error C7011: implicit cast from "float" to "vec2"
0(197) : error C7011: implicit cast from "float" to "vec2"
0(197) : error C7011: implicit cast from "float" to "vec2"
0(788) : error C7623: implicit narrowing of type from "vec3" to "float"

 Use 120.  Don't want to deprecate in/out and other stuff to use most of the code we're using.

  Post line 197 in your code (and maybe some of the stuff around it).  It will most likely be in "3DKn-1.0.1.frag" if you're using DE-Kn2.frag.

  Match the "line in preprocessed script" (at the bottom corner of the Fragmentarium log window?? or just Fragmentarium window??) with  the line number 197 from the warning: O(197).....

  Also, post line 788 from your code.  Or better yet, just post the entire frags here and I'll look at them if they will even run on my old GPU.

quick aside (and you might have said it before!)  Do you use nVidia or AMD, and what card do you use??  ohh... btw, pretty image.  When I get a newer GPU that isn't about 1/1000th as powerful as yours, I'll be doing stuff like that.  wink  
« Last Edit: December 19, 2015, 09:01:33 PM by M Benesi » Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #114 on: December 19, 2015, 11:19:23 PM »

Under the "Render" menu,
select "Output preprocessed script",
this will open a new tab with the complete script as it is when executed.

if you have editor line numbers turned on in preferences you will easily be able to find the right line for any error wink
or you can save the preprocessed script and use your favourite editor to look at it while editing the fragment in Fragmentarium cheesy

also: moving features from #defines to bool uniform will increase the code size, use the #defines instead
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #115 on: December 20, 2015, 06:47:43 AM »

First question: I don't really now. Try locking some parameters (like number of reflexions, shadow... etc.) and don't activate features that you don't use...
You mean yellow lock? Or replace varying to constant value in code?
Second question: by default Nvidia compiler gives you all it's features. It is also very forgiving about the standards so you may end up with shaders that only work on Nvidia GC. Using #version tells the compiler to conform exactly to the version of GLSL that you are targeting.
As i understand, it does not affect performance.

  Use 120.  Don't want to deprecate in/out and other stuff to use most of the code we're using.

  Post line 197 in your code (and maybe some of the stuff around it).  It will most likely be in "3DKn-1.0.1.frag" if you're using DE-Kn2.frag.

  Match the "line in preprocessed script" (at the bottom corner of the Fragmentarium log window?? or just Fragmentarium window??) with  the line number 197 from the warning: O(197).....

  Also, post line 788 from your code.  Or better yet, just post the entire frags here and I'll look at them if they will even run on my old GPU.

quick aside (and you might have said it before!)  Do you use nVidia or AMD, and what card do you use??  ohh... btw, pretty image.  When I get a newer GPU that isn't about 1/1000th as powerful as yours, I'll be doing stuff like that.  wink 
I use nvidia gtx660, little overclocked  grin Here frags. De-raytracer changed

* frag-19.12.2015-01.bmp Files.zip (18.99 KB - downloaded 75 times.)
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #116 on: December 20, 2015, 06:58:14 AM »

yellow lock == constant value in code
Fragmentarium does this for you smiley
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #117 on: December 20, 2015, 07:17:28 AM »

I quickly tried now... It's work! Cool! Thank you very much!  A Beer Cup A Beer Cup A Beer Cup So i can make code more complicated  grin
Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #118 on: December 20, 2015, 07:59:26 AM »

  Cool!
Logged

knighty
Fractal Iambus
***
Posts: 819


« Reply #119 on: December 20, 2015, 11:40:29 AM »

(...) So i can make code more complicated  grin
rolling on floor laughing
  Use 120.  (...) will even run on my old GPU.
(...)  wink 
grin
It is always a good practice to use #version in order to make sure it will work on other graphics cards.
Logged
Pages: 1 ... 6 7 [8] 9 10 ... 16   Go Down
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.151 seconds with 25 queries. (Pretty URLs adds 0.012s, 2q)