Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DX shaders in FS2004 - research

Featured Replies

When browsing around I found some DX shaders defining the water. (I know someone else from NZ found this before me, but I never chased it up until now, too busy).Something like this (WaterHLSL.fx)://// water shader//// texture 0 - base texture// texture 1 - envmap//// result = Base + Env.a * Env// = T0 + T1.a * T1//#include "Common.fx"#include "CommonLandWater.fx"technique T1{ pass p0 { VertexShader = compile vs_1_1 main_T1(); PixelShader = asm { ps_1_1 tex t0 tex t1 mad_sat r0, t1, t1.a, t0 }; Texture[0] = (tDiffuse); Texture[1] = (tEnvMap); TexCoordIndex[0] = 0; TexCoordIndex[1] = 1; TextureTransformFlags[0] = Disable; TextureTransformFlags[1] = Disable; AddressU[0] = Clamp; AddressV[0] = Clamp; AddressU[1] = Clamp; AddressV[1] = Clamp; SrcBlend = One; DestBlend = Zero; AlphaBlendEnable = False; }}// Fallback - base texturetechnique T2{ pass P0 { fvf = XYZ | Tex1; VertexShader = NULL; PixelShader = NULL; Texture[0] = (tDiffuse); TexCoordIndex[0] = 0; ColorOp[0] = SelectArg1; AlphaOp[0] = SelectArg1; ColorArg1[0] = Texture; AlphaArg1[0] = Texture; ColorOp[1] = Disable; AlphaOp[1] = Disable; AddressU[0] = Clamp; AddressV[0] = Clamp; SrcBlend = One; DestBlend = Zero; AlphaBlendEnable = False; }}I tried to modify the file, but couldn't get FS2004 to read it. I suspect this isn't possible, so we have to live with the water we currently have.But there could potentially be another exploit: FS2002/4 are using a texture definition called TEXTURE2_SHADER, similar to TEXTURE2_REFLECT for the bgl command BGL_TEXTURE_LIST. Now, it could potentially be possible to load a HLSL shader using this flag. It should be pretty straight forward to write a BGLC file and make use of it. I would do it myself, but don't really have the time as I'm persuing other projects (that wouldn't make use of it). However, this should really be chased up, because this would open a realm of graphical possiblities, eg bumpmapping, fresnel refractions, etc, etc. I suspect this will be the huge big feature in FS2006, but if we get this to work now, this would really hit the spot...Cheers, Christian

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.