Using a Render Pipeline to Render Primitives 使用渲染管道去渲染一个几何体(本例为渲染一个三角形)

unity绘制管道_【译文】unity可编程渲染管道#1——自定义管道 前言Scriptable Render Pipeline定制流水线控制渲染创建管道资产和实例。剔除,过滤,排序,渲染。保持记忆清洁。提供良好的编辑体验。这是涵盖Unity可编写脚本的渲染系列教程的第一部分管道。本教程假设您首先完成了基础知识系列,并且已经完成了程序网格教程。渲染系列的前几部分也很有用。本教程使用Unity 2018.3.0f2。新渲染管道的诞生。1. 创建管道要渲染任何东西,Uni... 阅读详情

Using a Render Pipeline to Render Primitives

使用渲染管道去渲染一个几何体
Render a simple 2D triangle. 渲染一个简单的三角形
需要下载示例代码的请搜索上传文件。
文件名:“Using a Render Pipeline to Render Primitives .zip”

Overview

In Using Metal to Draw a View’s Contents用metal 绘制视图内容一文中, you learned how to set up an MTKView object and to change the view’s contents using a render pass.
That sample simply erased the view’s contents to a background color. 那个例子简单的擦除掉视图内容并填充了一个背景色。
This sample shows you how to configure a render pipeline and use it as part of the render pass to draw a simple 2D colored triangle into the view.
本立展示如何定义一个渲染管道(管道就是渲染流程的意思,把数据送到一个入口,然后通过已经定义好的渲染管道,加工成图形显示数据后在传出。记住,渲染管道就是渲染流程即可,为了和英文统一,以后统一采用渲染管道),然后用选它来绘制一个简单的2D彩色三角形。
The sample supplies a position and color for each vertex顶点, and the render pipeline uses that data to render the triangle, interpolating内插 color values between the colors specified for the triangle’s vertices.

oop4587

The Xcode project contains schemes for running the sample on macOS, iOS, and tvOS.

Understand the Metal Render Pipeline 了解Metal渲染管道

注:关于Metal中RenderPipeline的相关术语,并没有严格的规定,希望大家在学习中尽可能使用英文术语,但要明白其中的含义。
A render pipeline processes加工处理 drawing commands and writes data into a render pass’s targets.
A render pipeline has many stages阶段, some programmed using shaders and others with fixed or configurable behavior.这些阶段一些用“着色器”编程,另外一些是不可修改的或行为定义。
This sample focuses on the three main stages of the pipeline: the vertex stage, the rasterization stage, and the fragment stage.
The vertex stage and fragment stage are programmable, so you write functions for them in Metal Shading Language (MSL).
The rasterization stage has fixed固定的 behavior.
Figure 1 Main stages of the Metal graphics render pipeline图形渲染管道的主要阶段(步骤)
o o p4587

Rendering starts with a drawing command, which includes a vertex count and what kind of primitive to render. For example, here’s the drawing command from this sample:

// Draw the triangle.
[renderEncoder drawPrimitives:MTLPrimitiveTypeTriangle
                  vertexStart:0
                  vertexCount:3];

The vertex stage provides data for each vertex. When enough vertices have been processed, the render pipeline rasterizes the primitive, determining判断 which pixels像素点 in the render targets lie within the boundaries of the primitive. The fragment stage determines the values to write into the render targets for those pixels.

In the rest of this sample, you will see how to write the vertex and fragment functions, how to create the render pipeline state object, and finally, how to encode a draw command that uses this pipeline.

Decide How Data is Processed by Your Custom Render Pipeline

A vertex function generates data for a single vertex and a fragment function generates data for a single fragment, but you decide how they work.
You configure the stages of the pipeline with a goal in mind, meaning that you know what you want the pipeline to generate and how it generates those results.

Decide what data to pass into your render pipeline and what data is passed to later stages of the pipeline. There are typically three places where you do this:

  • The inputs to the pipeline, which are provided by your app and passed to the vertex stage.
  • The outputs of the vertex stage, which is passed to the rasterization stage.
  • The inputs to the fragment stage, which are provided by your app or generated by the rasterization stage.

In this sample, the input data for the pipeline is the position of a vertex and its color. To demonstrate演示 the kind of transformation you typically perform in a vertex function, input coordinates are defined in a custom coordinate space, measured in pixels from the center of the view. These coordinates坐标 need to be translated into Metal’s coordinate system.

Declare an AAPLVertex structure, using SIMD vector types to hold the position and color data.
To share a single definition for how the structure is laid out in memory, declare the structure in a common header and import it in both the Metal shader and the app. 为了在内存中共享单一定义的数据结构,在一个通用头文件中定义结构,然后在着色器和程序中同时导入结构。

typedef struct
{
    vector_float2 position;
    vector_float4 color;
} AAPLVertex;

SIMD types are commonplace常见的 in Metal Shading Language, and you should also use them in your app using the simd library.
SIMD types contain multiple channels of a particular data type, so declaring the position as a vector_float2 means it contains two 32-bit float values (which will hold the x and y coordinates.)
Colors are stored using a vector_float4, so they have four channels – red, green, blue, and alpha.

In the app, the input data is specified using a constant array:

static const AAPLVertex triangleVertices[] =
{
    // 2D positions,    RGBA colors
    { {  250,  -250 }, { 1, 0, 0, 1 } },
    { { -250,  -250 }, { 0, 1, 0, 1 } },
    { {    0,   250 }, { 0, 0, 1, 1 } },
};

The vertex stage generates data for a vertex, so it needs to provide a color and a transformed position.
Declare a RasterizerData structure containing a position and a color value, again using SIMD types. (在Metal着色器中)声明一个RasterizerData结构包含位置和颜色,继续使用SIMD

struct RasterizerData
{
    // The [[position]] attribute of this member indicates that this value
    // is the clip space position of the vertex when this structure is
    // returned from the vertex function.
    //当顶点着色器返回这个结构时,这个成员的[[position]]属性表明了表明了这个值是顶点切片空间位置。
    float4 position [[position]];

    // Since this member does not have a special attribute, the rasterizer
    // interpolates its value with the values of the other triangle vertices
    // and then passes the interpolated value to the fragment shader for each
    // fragment in the triangle.
    //因为这个成员没有一个指定的属性,栅格化器用其他三角形顶点的值插值它的值,然后将插值的值传递给三角形中每个片元的片元着色器。
    float4 color;
};

The output position (described in detail below) must be defined as a vector_float4. The color is declared as it was in the input data structure.

You need to tell Metal which field in the rasterization data provides position data, because Metal doesn’t enforce any particular naming convention for fields in your struct.
Annotate the position field with the [[position]] attribute qualifier to declare that this field holds the output position.

The fragment function simply passes the rasterization stage’s data to later stages so it doesn’t need any additional arguments.

Declare the Vertex Function声明顶点函数

Declare the vertex function, including its input arguments and the data it outputs.
Much like compute functions were declared using the kernel keyword, you declare a vertex function using the vertex keyword.

vertex RasterizerData
vertexShader(uint vertexID [[vertex_id]],
             constant AAPLVertex *vertices [[buffer(AAPLVertexInputIndexVertices)]],
             constant vector_uint2 *viewportSizePointer [[buffer(AAPLVertexInputIndexViewportSize)]])

The first argument, vertexID, uses the [[vertex_id]] attribute qualifier, which is another Metal keyword.
When you execute a render command, the GPU calls your vertex function multiple times, generating a unique value for each vertex.

The second argument, vertices, is an array that contains the vertex data, using the AAPLVertex struct previously defined.

To transform the position into Metal’s coordinates, the function needs the size of the viewport (in pixels) that the triangle is being drawn into, so this is stored in the viewportSizePointer argument.为了转化位置到Metal坐标,顶点函数需要那个要绘制三角形视口的尺寸(像素),所以视口尺寸参数时第三个参数。

The second and third arguments have the [[buffer(n)]] attribute qualifier修饰符.
By default, Metal assigns slots in the argument table for each parameter automatically.
When you add the [[buffer(n)]] qualifier to a buffer argument, you tell Metal explicitly明确地 which slot to use.
Declaring slots explicitly can make it easier to revise修订 your shaders without also needing to change your app code.
Declare the constants for the two indicies索引 in the shared header file.

The function’s output is a RasterizerData struct.

Write the Vertex Function 编写顶点函数

Your vertex function must generate both fields of the output struct.
Use the vertexID argument to index into the vertices array and read the input data for the vertex.
Also, retrieve检索 the viewport dimensions.

float2 pixelSpacePosition = vertices[vertexID].position.xy;

// Get the viewport size and cast to float.
vector_float2 viewportSize = vector_float2(*viewportSizePointer);

Vertex functions must provide position data in clip-space coordinates切片空间坐标, which are 3D points specified using a four-dimensional homogenous vector (x,y,z,w)四维齐次向量. The rasterization stage takes the output position and divides the x,y, and z coordinates by w to generate a 3D point in normalized device coordinates. Normalized标准化 device coordinates are independent独立 of viewport size.

Figure 2 Normalized device coordinate system
在这里插入图片描述

Normalized device coordinates use a left-handed coordinate system and map to positions in the viewport.
Primitives are clipped to a box in this coordinate system and then rasterized.
The lower-left corner of the clipping box is at an (x,y) coordinate of (-1.0,-1.0) and the upper-right corner is at (1.0,1.0).
Positive-z values point away from the camera (into the screen.)
The visible portion部分 of the z coordinate is between 0.0 (the near clipping plane) and 1.0 (the far clipping plane).

Transform the input coordinate system to the normalized device coordinate system.转化一个输入坐标系到 标准设备坐标系

opp4587

Because this is a 2D application and does not need homogenous齐次 coordinates, first write a default value to the output coordinate, with the the w value is set to 1.0 and the other coordinates set to 0.0. 因为这个2D程序并不需要齐次坐标系,所以首先直接先给输出坐标一个缺省值(w设为1.0,其他设为0.0)。
This means that the coordinates are already in the normalized device coordinate space and the vertex function should generate (x,y) coordinates in that coordinate space.
Divide the input position by half the viewport size to generate normalized device coordinates.把坐标除以视口一般进行标准化坐标。
Since this calculation is performed using SIMD types, both channels can be divided at the same time using a single line of code.//由于此计算是使用SIMD类型执行的,因此可以使用一行代码同时计算(除)两个通道(x,y)。
Perform the divide and put the results in the x and y channels of the output position.

out.position = vector_float4(0.0, 0.0, 0.0, 1.0);
out.position.xy = pixelSpacePosition / (viewportSize / 2.0);

Finally, copy the color value into the out.color return value.

out.color = vertices[vertexID].color;

Write a Fragment Function 编写片元函数

A fragment is a possible change to the render targets. The rasterizer determines which pixels of the render target are covered by the primitive.
Only fragments whose pixel centers are inside the triangle are rendered.

Figure 3 Fragments generated by the rasterization stage 片元化阶段生产片元
oop4587

A fragment function processes incoming information from the rasterizer for a single position and calculates output values for each of the render targets. These fragment values are processed by later stages in the pipeline, eventually最终 being written to the render targets.

  • Note: The reason a fragment is called a possible change is because the pipeline stages after the fragment stage can be configured to reject some fragments or change what gets written to the render targets. In this sample, all values calculated by the fragment stage are written as-is照原样 to the render target. 注:片元化的可更改指的是之后的流程可以被配置为拒绝某些片元或更改写入目标的内容。

The fragment shader in this sample receives the same parameters that were declared in the vertex shader’s output. Declare the fragment function using the fragment keyword. It takes a single argument, the same RasterizerData structure that was provided by the vertex stage. Add the [[stage_in]] attribute qualifier to indicate表明 that this argument is generated by the rasterizer.

fragment float4 fragmentShader(RasterizerData in [[stage_in]])

If your fragment function writes to multiple render targets, it must declare a struct with fields for each render target.如果你的片元函数需要写入多个渲染目标,就必须声明一个多字段的结构,每个字段针对每个渲染目标。
Because this sample only has a single render target, you specify a floating-point vector directly as the function’s output. This output is the color to be written to the render target.

The rasterization stage calculates values for each fragment’s arguments and calls the fragment function with them.
The rasterization stage calculates its color argument as a blend混合 of the colors at the triangle’s vertices.
The closer a fragment is to a vertex, the more that vertex contributes to the final color.

Figure 4 Interpolated fragment colors 内插片元颜色
在这里插入图片描述

Return the interpolated内插 color as the function’s output.

return in.color; //这里的in可能是固定用法,知道的请告诉我。

Create a Render Pipeline State Object 建立一个渲染管道状态对象

Now that the functions are complete, you can create a render pipeline that uses them.
First, get the default library and obtain a [MTLFunction][MTLFunction] object for each function.现在,函数都定义好了,你能建立一个渲染管道来使用它们。首先建立缺省库。

id<MTLLibrary> defaultLibrary = [_device newDefaultLibrary];

id<MTLFunction> vertexFunction = [defaultLibrary newFunctionWithName:@"vertexShader"];
id<MTLFunction> fragmentFunction = [defaultLibrary newFunctionWithName:@"fragmentShader"];

Next, create a [MTLRenderPipelineState][MTLRenderPipelineState] object.
Render pipelines have more stages to configure, so you use a [MTLRenderPipelineDescriptor][MTLRenderPipelineDescriptor] to configure the pipeline.

MTLRenderPipelineDescriptor *pipelineStateDescriptor = [[MTLRenderPipelineDescriptor alloc] init];
pipelineStateDescriptor.label = @"Simple Pipeline";
pipelineStateDescriptor.vertexFunction = vertexFunction;
pipelineStateDescriptor.fragmentFunction = fragmentFunction;
pipelineStateDescriptor.colorAttachments[0].pixelFormat = mtkView.colorPixelFormat;

_pipelineState = [_device newRenderPipelineStateWithDescriptor:pipelineStateDescriptor
                                                         error:&error];

In addition to specifying the vertex and fragment functions, you also declare the pixel format of all render targets that the pipeline will draw into. 在指定顶点函数和片元函数后,进一步声明了pixel format像素格式给渲染管道要绘制的所有渲染目标。
A pixel format ([MTLPixelFormat][MTLPixelFormat]) defines the memory layout of pixel data. 一个像素格式定义了内存的像素数据布局。
For simple formats, this definition includes the number of bytes per pixel, the number of channels of data stored in a pixel, and the bit layout of those channels.对于简单的(像素)格式,这个定义包括每个像素的字节数,每个像素保存的频道数和这些频道的位布局。
Since this sample only has one render target and it is provided by the view, copy the view’s pixel format into the render pipeline descriptor.
Your render pipeline state must use a pixel format that is compatible with the one specified by the render pass.
In this sample, the render pass and the pipeline state object both use the view’s pixel format, so they are always the same.

When Metal creates the render pipeline state object, the pipeline is configured to convert the fragment function’s output into the render target’s pixel format.
If you want to target a different pixel format, you need to create a different pipeline state object.
You can reuse the same shaders in multiple pipelines targeting different pixel formats.
对于不同像素格式的多种渲染管道,你可以重用着色器。

Set a Viewport 设置一个视口

Now that you have the render pipeline state object for the pipeline, you’ll render the triangle. You do this using a render command encoder. First, set the viewport, so that Metal knows which part of the render target you want to draw into.

// Set the region of the drawable to draw into.
[renderEncoder setViewport:(MTLViewport){0.0, 0.0, _viewportSize.x, _viewportSize.y, 0.0, 1.0 }];

Set the Render Pipeline State

Set the render pipeline state for the pipeline you want to use.

[renderEncoder setRenderPipelineState:_pipelineState];

Send Argument Data to the Vertex Function 发送参数到顶点函数

Often经常性的, you use buffers ([MTLBuffer][MTLBuffer]) to pass data to shaders.
However, when you need to pass only a small amount of data to the vertex function, as is the case here, copy the data directly into the command buffer.经常性的,使用MTLBuffer缓冲来发送数据到着色器。然而,当你传送少量数据给顶点函数时,就像本例中情况,(可以)直接复制数据到命令缓冲。

The sample copies data for both parameters into the command buffer.本例复制两个参数给命令缓冲:
The vertex data is copied from an array defined in the sample.顶点数据复制自一个数组
The viewport data is copied from the same variable that you used to set the viewport. 视口数据复制自你设置好的视口变量。

In this sample, the fragment function uses only the data it receives from the rasterizer, so there are no arguments to set.

[renderEncoder setVertexBytes:triangleVertices
                       length:sizeof(triangleVertices)
                      atIndex:AAPLVertexInputIndexVertices];

[renderEncoder setVertexBytes:&_viewportSize
                       length:sizeof(_viewportSize)
                      atIndex:AAPLVertexInputIndexViewportSize];

Encode the Drawing Command 编码绘制命令

Specify the kind of primitive, the starting index, and the number of vertices.指定几何图形的种类,索引起始点,和顶点数量
When the triangle is rendered, the vertex function is called with values of 0, 1, and 2 for the vertexID argument. 当渲染这个三角形时,顶点函数的参数依次是vertexID的0,1,2参数。
回见“声明顶点函数”一节,

// Draw the triangle.
[renderEncoder drawPrimitives:MTLPrimitiveTypeTriangle
                  vertexStart:0
                  vertexCount:3];

As with Drawing to the Screen Using Metal, you end the encoding process and commit the command buffer.
However, you could encode more render commands using the same set of steps.
The final image is rendered as if the commands were processed in the order they were specified.
(For performance, the GPU is allowed to process commands or even parts of commands in parallel, so long as the final result appears to have been rendered in order. )

Experiment with the Color Interpolation 体验色彩内插

In this sample, color values were interpolated across the triangle.
That’s often what you want, but sometimes you want a value to be generated by one vertex and remain constant across the whole primitive.
Specify the flat attribute qualifier修饰符 on an output of the vertex function to do this.
Try this now.
Find the definition of RasterizerData in the sample project and add the [[flat]] qualifier to its color field.

float4 color [[flat]];

Run the sample again. //三角形颜色会成为单一红色。
The render pipeline uses the color value from the first vertex (called the provoking vertex) uniformly across the triangle, and it ignores the colors from the other two vertices.
You can use a mix of flat shaded and interpolated values, simply by adding or omitting删除 the flat qualifier on your vertex function’s outputs.
The [Metal Shading Language specification][ShadingLanguageSpec] defines other attribute qualifiers you can also use to modify the rasterization behavior.

加油,看到这里的同学们。
o o p4587
这应该就是我们要的结果吧。
这几篇文章,我都会单独上传源代码,需要调试运行的伙伴们,请直接下载。

【Cesium-源码解析】Primitive渲染流程, Primitive渲染流程。 阅读详情

相关推荐

uni-app 和 Flutter 打包上架 iOS 频繁触发 4.3 (a):原因拆解与合规处理路径

跨端方案让 iOS 上架的门槛降低了,但也带来一个明显的副作用 ——4.3 (a) 的命中率显著高于原生项目。很多开发者不理解:业务代码明明是自己写的,为什么还会被判为重复应用。这篇专门讲跨端场景,把原因和可走的路径讲清楚。

wuxianda1030的博客 201

unity c# 动态设置 切换URP渲染管线

unity c# VR

翻肚鱼儿的博客 939

GraphRAG + Ollama 本地化部署实战:从零搭建知识图谱问答系统

本文详细介绍了如何在本地部署GraphRAG与Ollama,搭建一个完全自主可控的知识图谱问答系统。通过逐步指导环境配置、项目初始化、核心设置修改以及源码适配,成功将GraphRAG从依赖云端OpenAI API转向本地Ollama服务,并选用qwen2.5:7b和nomic-embed-text模型。该方案有效解决了数据隐私与持续API成本问题,特别适合中小企业构建内部知识库或智能客服系统。

x2y3z4a5b的博客 919

Unity简单操作:unity2019 There is no HDRP Asset provided in GraphicsSettings. Are you sure...

如题: GraphicsSettinas中没有提供HDRP资产。您确定要继续吗?如果没有它,构建时间会非常长。 在工程目录右键Create-->Rednering-->New HDRenderPipelineAsset 然后填入 如下图的位置 继续Build 即可 ...

weixin_39114763的博客 1199

STM32+Air724UG基于阿里云物联网平台的OTA远程升级实战指南

本文提供了一套基于STM32微控制器与Air724UG 4G Cat.1通信模组,通过阿里云物联网平台实现OTA远程升级的完整实战指南。文章详细阐述了BootLoader与用户程序的分工、云端配置、固件下载与烧写流程,并分享了关键代码实现与常见问题排查方法,帮助开发者快速为物联网设备部署稳定可靠的无线升级功能。

weixin_28285943的博客 514

Haclon案例-找出图中面积最大的圆

自带的函数,求得圆的面积和圆心点坐标,然后,用本章所学习的选择算子和循环算子找出面积最大的圆。的图片,试着给它加上不同种类的噪声,然后找出其中面积最大的圆,并将圆的面积标注在其圆心位置。可知,除了六个圆形之外,还有一些微小的噪声点,采用了开运算和特征选择的方法去除噪声。1. 该图片为一灰度图,对其进行二值化,二值化后如图。4. 在面积最大圆的圆心坐标位置写上该圆的面积。

qq_20660115的博客 904

Unity使用ShaderGraph,设置SRP的RenderPipelineAsset后,原有材质显示紫色的问题

文章目录一、问题二、解决办法 一、问题 Unity使用ShaderGraph,需要创建一个RenderPipelineAsset,然后在PlayerSettings - Graphics - Scriptable Render Pipeline Settings中设置RenderPipelineAsset 设置后,我们会发现,原有的模型的材质球显示会异常,变成紫色 二、解决办法 点击菜单 Edit - Render Pipeline - Universal Render Pipeline - Upgra

linxinfa的专栏 1万+

保姆级教程:用SNAP处理哨兵一号数据,5步搞定城区范围提取(附江西晋城案例)

本文提供了一份详细的保姆级教程,介绍如何使用SNAP软件处理哨兵一号数据,通过5个关键步骤快速提取城区范围。以江西晋城为例,教程涵盖数据准备、预处理、核心处理流程、自动化搭建及成果分析,帮助用户轻松掌握SNAP操作技巧,适用于城市规划、环境监测等领域。

weixin_32535389的博客 454

设置可用的渲染管线资源

设置可用的渲染管线资源 在SRP中,你的工程需要有一个激活的渲染管线资源(Render Pipeline Asset).这一章的内容有在Editor以及运行时的情况下设置渲染管线资源的相关资讯 兼容性和性能 因为SRP是高度可配置的,所以改变激活的渲染管线资源只会导致很小的变化,比如用同样的渲染管线实例对应不同的quality等级,或者来一个大的改变,比如从通用渲染管线(URP)切换到高清晰渲染管线(HDRP). 如果你从一个激活的渲染管线资源换到另外一个使用了不同渲染管线实例的管线资源,你必须要保证你项目

qq_22393417的专栏 810

【全网最全最详细】智能体提示词prompt教程

定义:提示词是用户输入给AI模型(如ChatGPT、MidJourney等)的指令或问题,用于引导模型生成特定类型的输出。它是用户与AI交互的核心媒介。作用:提示词的质量直接影响AI输出的准确性和相关性。好的提示词能明确任务边界、减少歧义,并激发模型的创造力。提示词就是“给AI下指令的说明书”——越清楚、越具体,AI干得越好!帮你更快、更准地拿到想要的结果,不用和AI“猜谜语”。

qq_38196449的博客 8220

二、Creo模型的功能函数 例如:模型(元件)的干涉........

【代码】模型(元件)的干涉。

行为艺术家Zzz的博客 615

unity pixel_2D Pixel Perfect:如何为复古的16位游戏设置Unity项目

unity pixelIn our first 2D Pixel Perfect guide for retro games, we showed you how to set up the 2D Pixel Perfect tool and how 8-bit graphics were made back in the day. In this post, we fast-forward to...

culiao6493的博客 1416

如何使用 Python 爬虫获取猫眼电影数据:电影评分与评论分析

随着互联网的快速发展,越来越多的人开始使用各种在线平台来了解电影信息,猫眼电影作为一个非常流行的在线电影票务平台,提供了详细的电影评分、评论和票房数据。本篇博客将详细介绍如何使用 Python 爬虫技术获取猫眼电影平台上的电影数据,重点关注电影评分和用户评论的爬取,分析其背后的数据处理和反爬虫技术。如果你对数据分析、电影评论分析等话题感兴趣,可以根据本文的示例进一步深入挖掘更多的数据,为决策提供支持,或为电影产业的相关研究提供有价值的分析依据。有些猫眼电影的页面数据是动态加载的,使用。

2201_76125261的博客 1623

LWRP(URP)学习笔记一渲染流程

导航LightweightRenderPipelineRender方法RenderSingleCamera 方法ForwardRendererForwardRenderer构造方法Setup重载 LightweightRenderPipeline Render方法 protected override void Render(ScriptableRenderContext rend...

nxl76450106的博客 5766

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

iOS开发Metal之使用渲染管道(Pipeline)来渲染图元(Primitives):渲染一个简单的二维三角形

预览 在使用Metal来画一个视图内容的文章中,你知道了如何设置一个MTKView对象并且知道了如何通过传递渲染参数来改变视图的内容。那个示例演示了将视图内容抹除换成了一个背景颜色。这个示例将向你展示如何配置一个渲染管道(Pipeline)并将它作为一部分的渲染传递参数来在视图上画一个简单的二维彩色的三角形。这个示例为每个顶点(Vertex)提供了位置和颜色,并且渲染管道使用了那些数据来渲染三角...

johndevelop的专栏 1355

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

Direct3D 11第二节 渲染三角形

[TOC]Elements of a TriangleInput LayoutRendering the Triangle

zty1012620的博客 777

[iOS]Runtime2

为了让你在父类中依然能访问当前对象(也就是子类的实例),编译器在底层会生成一个结构体,叫 : 当调用 时,底层调用的函数是 : 拿着(也就是当前的子类对象)作为消息接收者,但是把方法查找的起点定位在了 (父类)这里需要注意的就是仍然是调用者自己,即先讲一下上篇没讲过的,我们如果缓存未命中,那我们就会进入慢速查找,现在我们来详细的讲解在进入慢速查找的瞬间会再看一遍方法列表,然后立刻调用加锁,因为多线程下别人正在动态添加方法或者扩容,不加锁会崩溃类就绪OC的机制就是在编译期只生成了 结构,当类首次被发送消息时(

wzm20070304的博客 258

VS Code + KXApp 开发 iOS 报错排查指南,工程、签名、真机、补全、配置

在 VS Code 里用 KXApp 开发 iOS,报错常不在代码而在环境。本文按失败阶段分五类排查:工程没出现 Xcode 视图(查 .xcodeproj 与 xcode-select)、构建失败(No profiles、Team 签名、CocoaPods 用 .xcworkspace)、真机调试失败(信任、开发者模式、设备未准备好)、没补全或 No such module(等索引、清 clangd 冲突)、设置保存不了(装 xcodeproj gem),每类给现象、日志通道和修法。

2501_91590906的博客 206

Appuploader 创建 iOS 描述文件详解,Development / Ad Hoc / App Store

搞不清 iOS 描述文件(Provisioning Profile)该选 Development、Ad Hoc 还是 App Store?本文讲清四种类型各装到哪、哪些要绑设备、能不能上架,重点辨析最容易混的 Development 与 Ad Hoc,说明设备或证书变动后为什么要重建、重建后要重新导入签名,并给出不用 Mac 在 Windows/Linux 上用 Appuploader 新建与重建描述文件的实操步骤,附装机"描述文件不匹配"等常见问题排查。

2501_91373349的博客 236

VS Code 开发 iOS 工程,KXApp 与 Xcode 分工,双工具协同实操

想用 VS Code 写 iOS 又担心脱离 Xcode、搞乱团队工程?本文讲清 KXApp 和 Xcode 的并用关系:它是 Mac 上的 VS Code 扩展、必须装 Xcode 并调用它构建签名,两边共用编译结果(一边编过另一边不用重编)、共用同一份工程文件不迁移,补全用的 buildServer.json 可 gitignore 不影响同事,签名沿用 Xcode 登录的账户,Cmd+B/R/. 快捷键一致,Interface Builder 和 Instruments 仍回 Xcode。

2501_91592143的博客 70

苹果的内核跑上了安卓手机:2,631 Star 的 HakiOS 让 XNU 在 Adreno GPU 上画出 118 帧

HakiOS 把苹果开源的 XNU 内核搬上 Android 手机:自研引导器与驱动、RAM 内运行重启即还原,Metal 在 Adreno GPU 上跑出 118 帧。本文拆解其分层架构、双路线性能对比与法律边界。

话梅糖の优快云 Blog 339

Windows 开发 iOS,Sign in with Apple 苹果登录,KXBuild 真机调试全流程

Sign in with Apple 接入分四步:App ID 开能力并重新生成描述文件,entitlements 加 com.apple.developer.applesignin,用 SignInWithAppleButton 拿 identityToken 交服务端验签,删账号时调 revoke。本文讲清审核指南 4.8 为什么要你提供它、姓名邮箱只给一次、用 user 当主键,并在 Windows 上用 KXBuild 真机测登录,附 1000 报错排查。

2501_91373349的博客 231

Appuploader 配置 iOS Bundle ID,开启推送、iCloud,解决描述文件失效问题

App 代码没动,去开发者后台取消勾选一个能力,再打包就签名失败、描述文件失效——为什么?本文讲清 iOS Bundle ID(App ID)的注册规矩(反向域名、创建后 Identifier 不可改、通配符、App Clip)、用 Appuploader 配置推送/iCloud/App Groups 等 Capabilities 的方法,重点说明能力配置与 Apple 门户实时同步、描述文件是能力的快照,以及取消能力为何导致描述文件失效、怎么重建修复,附改名、删除、通配符等常见问题。

2501_91591841的博客 155

iOS 深度链接配置教程,URL Scheme 与 Universal Links,KXBuild 真机验证

深度链接两种:URL Scheme(myapp://)只改 Info.plist 的 CFBundleURLTypes;Universal Links(https://)要开 Associated Domains、在 entitlements 写 applinks 域名、网站放 /.well-known/apple-app-site-association。讲清两者怎么选、onOpenURL 处理代码,在 Windows 上用 KXBuild 装 Debug 包真机验证,附 CDN 缓存和十个不跳转排查。

2501_91600747的博客 294

手机远程控制电脑哪家强?2026年iOS/安卓/鸿蒙横评实测,ToDesk/向日葵谁更流畅

手机远程控制电脑已成刚需,ToDesk凭借全平台覆盖、低延迟、无广告、免费不限速等优势,成为最佳选择。其iOS、安卓、鸿蒙及Mac系统均支持,实测连接快、操作流畅,虚拟键盘、外接键鼠、互动批注等功能体验出色。相较之下,向日葵存在限时踢线、传输慢、广告多等痛点。选购建议:无论用何种手机,首选ToDesk,实现高效便捷的远程办公与协助。

lx08113的博客 306
上一篇: Using Metal to Draw a View‘s Contents用Metal绘制视图内容
下一篇: Viewing Your GPU Workload with the Metal Debugger 利用Metal Debugger来查看显卡工作(排错)
oop4587
博客等级 码龄25年 19粉丝 26原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值