Jump to content

  • Log In with Google      Sign In   
  • Create Account


lunkhound

Member Since 25 Feb 2013
Offline Last Active Yesterday, 06:40 PM
-----

Posts I've Made

In Topic: Black smoke alpha settings

06 July 2014 - 05:31 PM

Additive blending, that is:

 

destColor = srcColor + destColor

 

can only lighten the color of what is underneath (because srcColor can't be negative).  Its fine for making white smoke, but not black smoke.

For black smoke, you could try subtractive blending (not sure if D3D9 supports this mode or not):

 

destColor = destColor - srcColor

 

Alternatively you could use normal alpha blending:

 

destColor = srcColor * srcAlpha + destColor * (1 - srcAlpha)

 

with a mostly dark colored texture with an alpha channel that is opaque in the middle and fades to a transparent circular border.  You'll probably want some noise added to the texture to make it look smoky.

Note that with alpha blending, the order the quads get drawn in matters (unlike with additive or subtractive blending) so you'll want to draw them in back-to-front order, otherwise it won't look right.


In Topic: Prevent Losing Entire Project To Malware

19 May 2014 - 03:29 PM

Sorry for your loss! sad.png

 

I also have a NAS, and also back up my project via BitBucket.

 

Unfortunately, I think Cryptoware writes to networked drives as well, so a NAS in that circumstance wouldn't help much. The virus doesn't need to be able to infect the linux NAS machine, it just uses NFS to overwrite the files. The fact that the NAS is mirrored in RAID 1 wouldn't help - the overwritten files would also get mirrored. The fact that the backup software I use is incremental and keeps multiple versions going back for several weeks wouldn't help - the old backups are also just files that would get overwritten by the virus.

 

A harddrive that is unplugged from the computer, and only plugged in when making the occasional backup, or online backup services that keep previous backups, would offer protection from this type of attack.

 

Actually, a ZFS-based NAS *could* protect against such a virus.  ZFS snapshots are a filesystem feature, not files--you can delete every file and folder on the filesystem but the snapshots are still there.  The snapshots are basically read-only from Windows.


In Topic: Prevent Losing Entire Project To Malware

19 May 2014 - 02:08 PM

I keep all of my important files on a dedicated fileserver which serves them up as SMB shares to my Windows boxes.  The fileserver is running a free variant of the Solaris OS with the ZFS filesystem and I'm using the free version of Napp-it to take ZFS-snapshots daily, weekly, monthly, and annually.  This lets me go back to earlier versions of my files from my Windows machines.  From the Windows machines, the snapshots are read-only, so a virus on Windows can't alter or erase them.  I keep the fileserver behind a hardware firewall which blocks (almost) all internet access to keep it safe from malware.

The fileserver uses disk mirroring to keep redundant copies of everything, and ZFS has block-level checksumming and auto-self healing to protect against hard drive errors or failure.  The fileserver also uses ECC RAM to protect against in-memory data corruption due to cosmic rays or whatever.

In addition, the fileserver is backed up to the cloud, so even if the fileserver and all of my computers were destroyed, I could still recover my data.

 

I've been using a setup like this for about 4 years now and haven't lost any files in that time.  I've found the snapshots useful on occasion, and the ZFS checksumming detected when one of my enterprise-grade drives started writing tons of errors after working perfectly for years.  Fortunately the other drive in the mirror still had a perfect copy of everything, so after replacing the drive and a few hours of resilvering everything was fine.

More info about ZFS/Napp-it here:

http://hardforum.com/showthread.php?t=1573272

 

Also, I don't recommend using Visual Studio to edit your source files directly on a network share.  It will slow down the UI thread to a crawl because of intellisense and the fact that Windows won't cache files on a network share.  It probably slows down compile times as well.  So I work on a local copy and I use a program called FreeFileSync to mirror my work to a location on the network share where it can get snapshotted and backed up remotely.


In Topic: Graphics baseline for a good-looking PC game?

12 May 2014 - 07:56 PM

 

One huge difference I've noticed between really old games and new ones is the lack of repetitive textures. Some games seem to have an impossible texture budget. Do you think this is due to bigger textures, lots of textures plus splat mapping, fancy shaders, procedural textures, something else?

 

Well there's definitely more memory and manpower for creating unique textures, but a lot of it is due to techniques that are able to add unique detail using tileable textures. Many materials in modern games will blend together many maps, which can effectively hide the repetitiveness if done correctly. In our game all environment geometry uses "layer-blended" materials, where different maps and material properties are blended together based on blend weights stored in a  vertex color channel. This gives you the ability to paint unique features and "break-up" even though the textures being used for each layer are tiles across the surface.

 

 

If you've got non-overlapping UV coords, you could store the blending weights in a texture instead of on the vertex colors.  That way your layer transitions wouldn't be tied to vertex density.  You could also put the blend weights in a compressed texture to save a bit on memory.  Anyone know how UE4 does it?


In Topic: is there a free tool for debugging HLSL shaders?

31 March 2014 - 10:02 AM

You can use the Visual Studio 2013 Express for Windows for debugging shaders from your desktop app. Use Open Project from VS2013 for Windows to open the executable (probably the Debug build) and you will be able to use the Debug|Graphics option just fine. I.e. the twist is that you develop using one VS version and debug using another.

 

Are you sure that works with VS2013 Express?  Perhaps I'm missing something because I couldn't get it to work, and according to http://msdn.microsoft.com/en-us/library/vstudio/hh873207.aspx:

 

"Visual Studio 2013 Express for Windows Desktop does not support Graphics Diagnostics features."

 

@Mona2000: Thanks, I'll look into that!


PARTNERS