No idea - is it peculiar to the model in question?
It appears to be any model with no texture is just showing up white. Can that be addressed without having to create a texture for the model?
No idea - is it peculiar to the model in question?
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
<technique n="1">
....
....
....
<program>
<vertex-shader>Shaders/water_lightfield.vert</vertex-shader>
<fragment-shader>Shaders/water_lightfield.frag</fragment-shader>
<fragment-shader>Shaders/cloud-shadowfunc.frag</fragment-shader>
<fragment-shader>Shaders/hazes.frag</fragment-shader>
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
</program>
<uniform>
<name>view_pitch_offset</name>
<type>float</type>
<value><use>view_pitch_offset</use></value>
</uniform>
<uniform>
<name>view_heading_offset</name>
<type>float</type>
<value><use>view_heading_offset</use></value>
</uniform>
<uniform>
<name>field_of_view</name>
<type>float</type>
<value><use>view_fov</use></value>
</uniform>
<uniform>
<name>use_searchlight</name>
<type>int</type>
<value><use>use_searchlight</use></value>
</uniform>
<uniform>
<name>use_landing_light</name>
<type>int</type>
<value><use>use_landing_light</use></value>
</uniform>
<uniform>
<name>display_xsize</name>
<type>int</type>
<value><use>display_xsize</use></value>
</uniform>
<uniform>
<name>display_ysize</name>
<type>int</type>
<value><use>display_ysize</use></value>
</uniform>
uniform int use_searchlight;
uniform int use_landing_light;
vec3 searchlight(in float dist);
//I'm still using old version for now.
vec3 landing_light(in float dist);
//I wasn't sure about this but haven't got that far yet.
if (use_searchlight == 1){
finalColor.rgb += searchlight(dist);
}
if (use_landing_light == 1) {
finalColor.rgb += landing_light(dist);
}
What I would do next is to copy-paste the searchlight function from secondary_lights.frag directly into the water shader code
it's pretty freaking cool watching this - I mean, turning this into a little night vision/FLIR gadget by using a greenish filter would seem entirely possible now and it would also look incredibly cool, overlaid with a HUD, our combat folks should be pretty excited about this, and it probably won't take long for someone to come up with a Canvas-based sniper scope
opengl:4:..\..\..\..\flightgear\src\Viewer\fg_os_osgviewer.cxx:193:glLinkProgram "" FAILED
opengl:4:..\..\..\..\flightgear\src\Viewer\fg_os_osgviewer.cxx:193:Program "" infolog:
Fragment info
-------------
0(24) : error C1013: function "rand2D" is already defined at 0(53)
0(32) : error C1013: function "cosine_interpolate" is already defined at 0(57)
0(40) : error C1013: function "simple_interpolate" is already defined at 0(65)
0(45) : error C1013: function "interpolatedNoise2D" is already defined at 0(71)
0(99) : error C1013: function "Noise2D" is already defined at 0(91)
if (use_searchlight == 1){
finalColor.rgb += searchlight(dist);
}
if (use_landing_light == 1) {
finalColor.rgb += landing_light(dist);
}
gl_FragColor = finalColor;
They are the last thing before the final gl_FragColor = finalColor, yet in both tree-haze.frag and terrain-haze.frag, rather than adding them twice, they are before the if statements "if (dist > 0.04 * min(visibility,avisibility))".
I see you did tree.eff and tree_ALS.frag in addition to fog, does this mean your going to do the works, including model, water etc.?
I'm only asking because if you are then I'm done here and I'll leave off with, thank you and is there anything you would like me to do, writeup or doc's or anything?
I hope you won't consider the work you did wasted
I sort of realized when illuminating the fog that I had to go over a lot of shaders with this, and there's some tricky issues (like getting the specular channel to work as well, which is relevant for water, buildings and glossy models)
Users browsing this forum: No registered users and 1 guest