Is all terms in game dev similar across languages , Engines?

I just jumped into empty Xcode Project for Mac OS - Application Game

- few options there to choose from . The most interesting for 3D is Metal4 and RealityKit .

As looking on default template of Metal4 it comes with cube with texture ( so apply Godot Logo be good idea :slight_smile: ) but interestingly as looking through variables noticed how similarly they are called to Godot ones .

    var dynamicUniformBuffer: MTLBuffer
    var pipelineState: MTLRenderPipelineState
    var depthState: MTLDepthStencilState
    var colorMap: MTLTexture

Ok maybe just because language is English , but looking more into Shaders section

vertex ColorInOut vertexShader(Vertex in [[stage_in]],
                               constant Uniforms & uniforms [[ buffer(BufferIndexUniforms) ]])
{
    ColorInOut out;

    float4 position = float4(in.position, 1.0);
    out.position = uniforms.projectionMatrix * uniforms.modelViewMatrix * position;
    out.texCoord = in.texCoord;

    return out;
}

fragment float4 fragmentShader(ColorInOut in [[stage_in]],
                               constant Uniforms & uniforms [[ buffer(BufferIndexUniforms) ]],
                               texture2d<half> colorMap     [[ texture(TextureIndexColor) ]])
{
    constexpr sampler colorSampler(mip_filter::linear,
                                   mag_filter::linear,
                                   min_filter::linear);

    half4 colorSample   = colorMap.sample(colorSampler, in.texCoord.xy);

    return float4(colorSample);
}

this have some more similarities then Swift . especially when peek inside mip_filter:

enum class min_filter
{
  nearest = __METAL_MIN_FILTER_NEAREST__,
  linear = __METAL_MIN_FILTER_LINEAR__,
#if defined(__HAVE_BICUBIC_FILTERING__)
  bicubic = __METAL_MIN_FILTER_BICUBIC__
#endif
};

enum class filter
{
  nearest = __METAL_FILTER_NEAREST__,
  linear = __METAL_FILTER_LINEAR__,
#if defined(__HAVE_BICUBIC_FILTERING__)
  bicubic = __METAL_FILTER_BICUBIC__
#endif
};

enum class mip_filter
{
  none = __METAL_MIP_FILTER_NONE__,
  nearest = __METAL_MIP_FILTER_NEAREST__,
  linear = __METAL_MIP_FILTER_LINEAR__
};

enum class coord
{
  normalized = __METAL_COORD_NORMALIZED__,
  pixel = __METAL_COORD_PIXEL__
};

What catching my attention is coord normalized and pixel.

As saw in Godot on Mac OS generally you get Retina x2 resolution , but enabling half resolution not always bring it to native , so wonder if this have something to do with it as is it MoltenVK used as translation between Metal and Godot ? ( at least I have to download it before can compile arm version )

Is cube for some specific reason standard in 3d environment ? ( DirectX12 sample use it as well )

this using same as Godot export StoryBoard

RealityKit is purely based on Swift and there is some graphic properties which match exactly Blender or Godot , but interestingly Apple chooses format of Pixar ?

        /// Add a ``ModelDebugOptionsComponent`` with a visualization mode of
        /// `specular` to an entity to tell RealityKit to draw the entity’s
        /// calculated specularity as its surface color. RealityKit uses
        /// `specular` to calculate bright highlights caused by shiny surfaces
        /// reflecting light. RealityKit draws the specularity value as a
        /// grayscale value from black (`0.0`) to white (`1.0`).
        ///
        /// - Note: In most cases, RealityKit calculates specular highlights
        /// based on an entity’s `roughness` and `metallic` values, and not its
        /// `specular` value, which is usually `0.0`. As a result, this mode
        /// causes most entities to render in solid black. Only entities that
        /// need highlights in addition to the ones RealityKit calculates from
        /// `roughness` and `metallic` need `specular` values greater than zero.
        /// Examples of entities that might use `specular` to create
        /// supplemental highlights are gemstones and cut glass.
        ///
        /// RealityKit calculates specularity for entities with a
        /// ``SimpleMaterial`` and for entities imported from a USDZ file. For
        /// other entities, this option has no effect.
        ///
        /// Here’s how to enable ambient occlusion visualization for an entity:

Why did I created even the post ?
Well as recently came across of lack of understanding how Transform worked , it brought me to looking into linear algebra which brought me into look into course for computer graphics which use OpenGL ( deprecated by Godot ) but Zenva have it in course for OpenTK so I hopefully can get there some better understanding, also this curiosity brought me to look what use my machine ( Apple - and only approved method by them is use Xcode so I end up looking in their samples and what it is does )

It’s been some time since we’ve had programmable shaders, and even longer since software rendering. There been time to figure out best practices, which influences what hardware manufacturers implement, which feeds back into standard practices. So there’s a kind of “ground truth” in the context of mapping to hardware.

There’s a lot of papers written on computer graphics that go back to at least the 70s that give us consistent terms. And professionals often discuss their innovative solutions. Even if some team did invent a bunch of unique features for their renderer, it’s probably going to be out weighed by best practices when it comes to what it offers.

When it comes to approachable software like mainstream apis and game engines there’s going to be more of an effort to give people what they expect. Usually pull in people that use other industry software.

It’s a lot of stuff to disagree over though. And there’s a lot of interlocking parts. So if you’re learning from one source and applying it elsewhere you might run into issues where there’s different assumptions being made, or different things happening in the background, which isn’t easy to debug when you’re new to the subject.

1 Like