Jump to content

  • Log In with Google      Sign In   
  • Create Account


DemonRad

Member Since 31 Jan 2012
Offline Last Active May 21 2014 12:07 AM
-----

#5128969 AMD's Mantle API

Posted by DemonRad on 05 February 2014 - 05:00 AM

I'm very interested in Mantle, my main concern is not performance (still good to have), but doing some experimenting with new render tecniques, months ago I heard rumors about a new forward rendering tecnique from ATI, but found nothing about that, maybe now I'll see if that is possible. Does anyone know if it is possible to get symbols from Mantle even without the SDK? I'd like to try something already.




#5127854 AMD's Mantle API

Posted by DemonRad on 31 January 2014 - 05:20 PM

nice does not seem very complicated




#5127708 Texturing procedural terrain

Posted by DemonRad on 31 January 2014 - 06:33 AM

virtual texturing?




#5127702 How long would you support Shader Model 2?

Posted by DemonRad on 31 January 2014 - 06:11 AM

well using directly SM4 makes programmer life very easy, this is true.

 

PC stats:

stats from unity webplayer: http://stats.unity3d.com/web/gpu.html

stats from wikipedia: http://en.wikipedia.org/wiki/Usage_share_of_operating_systems

 

14% of people have SM2

10% of people have SM3

7% of people have OS X

 

Purely looking at those stats, makes more sense supporting SM2 than SM3 or OS X.

 

If you are going to make a mobile game you probably want to use some tool/SDK that target mobile instead of making your own native port, in that case you do most stuff in SM2 anyway because mobiles are a topic apart.

 

A lot of people with expensive hardware just play top AAA next-gen games and don't even bother with indies, so as far as there's a good portion of audience with SM2 I'll probably stick to that. If you start making tricks of sort to get that graphics effect because you are more focused on graphics than on gameplay then it is good idea you just start with SM4 and stop having troubles. (there's still a lot amazing stuff that can just be done on SM2, and by the way I'm more a shader writer than a game maker, don't misunderstand me I love SM4.)

 

I don't support something only if there are good reasons to do so (performance hit, maintenance hell, personal skill limits).

 

Most people is not able to change their videocard (even if cheap), and anyway laptops are less easy to customize, so I don't rely on the fact that "people will probaly spend 30 dollars to buy a cheap card to play my 10 dollars game", it is more likely that people  "spend 100 dollars to buy a decent card to play a recently released AAA title".




#5127510 Spectral Accumulation Shader

Posted by DemonRad on 30 January 2014 - 12:07 PM

pretty cool, seems perfect for shading metalsurfaces in dark zones with lights.




#5127507 How is CSG done?

Posted by DemonRad on 30 January 2014 - 11:55 AM

A "simple" approach is to memorize objects as volumes (for 2 spheres you just have 3 coordinates + radius), then you sample points until you find a "solid" point after that you start searching only nearby points where there's "empyt/solid" surface and you generate vertices in thhose points (you can link vertices using something like marching cubes).

 

note that I just proposed you the dummiest and not optimized algorithm, there are for sure much more better ways to do that.

 

note that there exist Framworks for doing that already (any 3d editing tool like Maya or blender already do that at application/script level), so if you find one for you language you can use it directly and probably will result in something more optimized than anything you can do youself




#5127461 High res Diffuse and depth image

Posted by DemonRad on 30 January 2014 - 08:25 AM

I'm searching for 1024x768 (or more) images for testing few shaders, those images must perfectly align, I tried searching on the web but I find always JPEGS (quality loss, and is causing artifacts), or images that don't align perfectly.

 

- Aligned

- High-res

- PNG

- Diffuse (RGB)

- Depth (8 bit is nice, but if anyone have 16/24 bits encoded in RGB channels that is nice too)

- Normals( not strictly required but nice to have normals too ).

 

I know I'm asking too much, but testing shaders oh spheres and cubes or using mis-aligned/lossy images is gettin me crazy.

 

This is for personal use only, still I'll glad to mention anyone helping me. thanks!




#5082545 Inline try/catch

Posted by DemonRad on 02 August 2013 - 12:32 PM

It sounds like a automatic-rethrow exception.

try{


}
catch(AllOrNothing by_value){
 // your interception code
 } 

// the magic class (this is just a draft

class AllOrNothing: public virtual std::exception{

public: 

    virtual ~AllOrNothing(){
        if(!flag)
            throw this->clone(~flag);
    }

};


when the catch block goes out of scope the argument is destroyed (if passed by value) and it throws. Of course it sets a flag when cloning so that it rethrows only once.




#5082529 fast memory manager

Posted by DemonRad on 02 August 2013 - 11:47 AM

http://goog-perftools.sourceforge.net/doc/tcmalloc.html

The only reason why I still not used it is that in my applications I really don't need complex allocations and I tend to use a simple custom pool allocator. Otherwise I think TCmalloc is what you need




#5082228 List of C++11 compliant compilers?

Posted by DemonRad on 01 August 2013 - 11:00 AM

http://gameprog.it/articles/90/c-11-getting-started-on-windows#.UfqTvKzN4vs for getting started on windows with c++11

 

else you can download last Qt package and just add the -std=c++11 flag to project file options (you get the mingw 4.8.x package along with Qt IDE).




#5068986 C++ string/stream

Posted by DemonRad on 11 June 2013 - 04:52 PM

Hi I was wandering the C++  STL's reference and I think I'm missing something

 

Actually I have a InputStream (ifstream) and I want to read exactly N characters from the stream, but I don't want to put them into a char[N] buffer, but I want to put them inside a std::string (eventually by first calling "str.resize(N)")

 

Wich is the fastest way for doing that?

 

actually I'm doing

 

for( int i=0;i<N;i++){
    char c;
    file->read(&c,sizeof(char));
    str.push_back(c);
}

but it is really really slow :(




#5067240 FileSystem libaries

Posted by DemonRad on 03 June 2013 - 06:40 PM

Do you know any good filesystem library?

please no PhysFS (C, nice but can't be extended without much effort and anyway does not provide polymorphic interfaces)

please no boost (heavy, hard to build, can't easily get only the file system dropping the rest of the library)

 

Possible there are only 2 filesystem libraries around all the net?




#4964641 Really Big Textures?

Posted by DemonRad on 30 July 2012 - 04:51 PM

simple downsampling is not suitable? breaking texture into multiple pieces can be hard depending on how UV are mapped to the model. If you have only a terrain that's fine and simple, more complex models will make things harder if not impossible. You can split the texture into 4 textures and remap UV to 1 to 4 different sets of UVs. That will need a shader and 4 textures used at the same time. So input of the vertex is always a UV set (you don't need to change UV). But instead of using 1 texture unit you use 4 textures units (each one with 1/4 of the original image)

-------->U
0......0.5....1
. ...............
0.5...0.5....1
................
1......1.......1
V

When UV is in the first quad you scale it by 2 and use first texture newU= 2*U; newV=V*2;
when UV is in the second quad newU = U*2 -1; newV = V*2;
When UV is in the third quad newU=U*2; newV = V*2-1;
When UV is in the fourth quad newU=U*2-1; newV = V*2-1;

quads assumed in this order

1 2
3 4


#4961241 Entity VS Behaviour

Posted by DemonRad on 20 July 2012 - 03:21 AM

I was reading about Entity systems, they look great, but I think they cannot handle all the work. The definition of entity system is

-System (logic)
-Entity (a number)
-Components (Data)

When I need complex Logic Isn't more worth using "logic bricks"? (for example I see hard implement a different AI for each component with a single system. A composite behaviour tree looks much more natural to mee with all the states implemented by separate classes).

The same applies to Animation System. Every scene node potenially animates in a different ways, and the only logical way to me to implement an animation is with a new class with a common interface.

For example If the system accepts only keyframes and bones for animation, I can't use the system for example for syncronize that particular animation with an event, doing that will require dedicated code in the AnimationSystem for what probably will be only a isolated case. Another approach so would be using a SynchroAnimationSystem only for that particular AnimatedComponent (from an entity point of view). But that will seems obese to me, since on long run there will be zillion Systems and making systems communicate within them will get harder.

So I start see limits:

Overgrowing systems (lot of code for particular cases in the same class) <---> many systems

Also certain things works better as behaviour trees (for example a Chain of Responsabilities, or State Driven logic) I see hard to make them become Entities system.


#4954376 Resources - Template Specialisation

Posted by DemonRad on 30 June 2012 - 03:10 PM

You can have a generic resource locator with templates, but you still need to create a different loader for each type of file. I usually prefer templates
for container and when some recursive code creation is needed (just used once for that). For all other things I prefer polymorphism (where a different implementation for each loader is explicitly needed since common interface is pure virtual).

If every item you can create can be created with the same constructor...

example:
class Resource //provide a way to know if  file was loaded or not
{
protected:
	 bool 	 Good; // resource is loaded

};


class VertexShader: public Resource
{
public:
	 VertexShader(AbstractFile * file); //abstract file, allow to load from HD's files but also from other sources (if needed in future)

};

class FragmentShader: public Resource
{
public:
	 FragmentShader(AbstractFile * file);

};

... then you can just have a simple template loader (don't know how this can be usefull to you)
template <typename T>
class ResourceLoader
{
	 std::shared_ptr<T> load(AbstractFile * file)	
	 {		  
	 	 T * res = new T(file);		  
	 	 return std::make_shared<T>(res);	
	 }
};






PARTNERS