Crist-JRoger
|
|
« Reply #105 on: December 15, 2015, 04:50:48 PM » |
|
|
|
« 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!
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« Reply #107 on: December 16, 2015, 10:04:17 PM » |
|
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #108 on: December 17, 2015, 02:56:00 AM » |
|
@Crist-JRoger nice @knighty 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 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
|
|
|
|
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. Having the depth buffer is welcome as a starting point. . 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 . 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
|
|
« Reply #110 on: December 17, 2015, 03:34:44 PM » |
|
tnx K I was thinking vec4 so programmer can use xyzw as they see fit, say normal xyz and depth w ? or... btw QScript is implemented
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« 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 " 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 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 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
|
|
« 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 " In logs it sounds: "Too much instructions" 110 and 120 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.
|
|
« Last Edit: December 19, 2015, 09:01:33 PM by M Benesi »
|
Logged
|
|
|
|
3dickulus
|
|
« 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 or you can save the preprocessed script and use your favourite editor to look at it while editing the fragment in Fragmentarium also: moving features from #defines to bool uniform will increase the code size, use the #defines instead
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« 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. I use nvidia gtx660, little overclocked Here frags. De-raytracer changed
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #116 on: December 20, 2015, 06:58:14 AM » |
|
yellow lock == constant value in code Fragmentarium does this for you
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« Reply #117 on: December 20, 2015, 07:17:28 AM » |
|
|
|
|
Logged
|
|
|
|
M Benesi
|
|
« 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 Use 120. (...) will even run on my old GPU. (...) It is always a good practice to use #version in order to make sure it will work on other graphics cards.
|
|
|
Logged
|
|
|
|
|