StakFallT
Community Member

Posts: 127
|
 |
« on: September 06, 2008, 12:54:48 PM » |
|
Been working on converting Zak's HLSL Sky demo C# code to Delphi 7. After much much agonizing work I managed to convert it over to a non-.net language-platform. It compiles, it runs, just I don't see anything.. I've even tried setting the background color to something to make objects stand out, and still nothing. I've tried this also with just bypassing the typical render routine and just outright render them from inside my main loop, nothing.. It's -extremely- math intense so I'm not sure where to start to debug this bear. I thought there was a way to set all meshes to a particular material, but I can't recall what it was, and even if that did infact do something, it wouldn't tell me much... It's almost like I'm missing information out of my log file (even though I've double checked the date of the file and it IS updated with each run). Anyone have any ideas or has anyone ever worked on converting an extremely math intense project? What were some of the ways you took the project head on, how did you deal with locating problems? Thanks in advance!
-- StakFallT
EDIT: I found 1 problem so far... TVGlobals.GetTex('<name>') always returns 0, even though it not only not-kicked out errors but it outright said they loaded ok. I've seen this before too in my other project... not sure what it's stemmed from though...
EDIT2: I've figured out part of the problem with things not appearing... Has to do with when a shader is applied to a mesh, it can make it vanish if something is not quite right behind the scenes of your project's code. Commenting that line, I did manage to get the clouds to appear, but they're uncolored and not moving. My thought is the math. So I'm BP'ing on a bunch of stuff, figured I'd check just to make sure the values being passed and returned back and forth are at least equaling something... Turns out I was getting alot of 0's, after fiddiling with it, I've minimized them, but am now occasionally getting INFs and NANs. I've minmized it by setting some of my variables and returns to extended instead of single. I originally thought single was the equivalent of C++/C#'s float type, apparently not if the HLSL code wasn't loosing data and my conversion is. So anyhow, I'm curious. Alot of the values I'm getting kicked back from functions is like <somenumber> to the -4319th power. Some I get looking -somewhat- normal like to the -170th power or -70th power, but the -4319th seems AWFULLY rediculous... does this code really actually produce such numbers when it's running properly?
|