当前位置: 首页 > news >正文

修改WordPress文章发布页面合肥seo推广培训班

修改WordPress文章发布页面,合肥seo推广培训班,下载新河网,公司想做个网站应该怎么做在UE中有时需要在CPU阶段操作像素,生成纹理贴图等,此时可以通过UTexture2D来进行处理,例子如下: 1.CPP部分 首先创建一个蓝图函数库,将UTexture2D的绘制逻辑封装成单个函数: .h: #include &…

在UE中有时需要在CPU阶段操作像素,生成纹理贴图等,此时可以通过UTexture2D来进行处理,例子如下:
在这里插入图片描述

1.CPP部分

首先创建一个蓝图函数库,将UTexture2D的绘制逻辑封装成单个函数:
.h:

#include "CoreMinimal.h"
#include "Engine/Texture2D.h"
#include "Engine/Texture.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "MyBlueprintFunctionLibrary.generated.h"UCLASS()
class MYPROJECT_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{GENERATED_BODY()UFUNCTION(BlueprintCallable, Category = "Texture")static UTexture2D* GenTexture(int32 Width, int32 Height);
};

.cpp:

#include "MyBlueprintFunctionLibrary.h"UTexture2D* UMyBlueprintFunctionLibrary::GenTexture(int32 Width, int32 Height)
{// 创建临时纹理UTexture2D* NewTexture = UTexture2D::CreateTransient(Width, Height);// 配置纹理NewTexture->MipGenSettings = TMGS_NoMipmaps;NewTexture->CompressionSettings = TC_VectorDisplacementmap;NewTexture->SRGB = false;// 锁定纹理数据进行写入FTexture2DMipMap& Mip = NewTexture->PlatformData->Mips[0];void* TextureData = Mip.BulkData.Lock(LOCK_READ_WRITE);// 设置三角形的大小int32 TriangleSize = Width / 10;  // 每个三角形的宽度和高度// 设置默认颜色FColor* FormattedImageData = static_cast<FColor*>(TextureData);for (int32 y = 0; y < Height; ++y){for (int32 x = 0; x < Width; ++x){int32 LocalX = x % TriangleSize;int32 LocalY = y % TriangleSize;// 判断像素是否在当前三角形内if (LocalX >= LocalY)  // 这里绘制一个局部的三角形{FormattedImageData[x + y * Width] = FColor::Red; // 三角形内部像素}else{FormattedImageData[x + y * Width] = FColor::Black; // 背景色}}}// 解锁纹理数据Mip.BulkData.Unlock();NewTexture->UpdateResource();return NewTexture;
}

需要修改build.cs添加模块引用:

PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput", "RenderCore", "RHI", "ProceduralMeshComponent" });

2.蓝图部分

新建材质球暴露材质参数img1:
在这里插入图片描述
创建Actor类型蓝图,添加一个Mesh类组件,这里添加一个Cube:
在这里插入图片描述
使用刚刚的GenTexture节点创建材质纹理,运行后即可查看效果。


https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UTexture2D


文章转载自:
http://necrose.bbrf.cn
http://crrus.bbrf.cn
http://glamorgan.bbrf.cn
http://misapprehensive.bbrf.cn
http://nuraghe.bbrf.cn
http://waterblink.bbrf.cn
http://presiding.bbrf.cn
http://fucus.bbrf.cn
http://tabid.bbrf.cn
http://arrenotoky.bbrf.cn
http://demarcative.bbrf.cn
http://fisheye.bbrf.cn
http://muscleless.bbrf.cn
http://tubuliflorous.bbrf.cn
http://dumpling.bbrf.cn
http://entity.bbrf.cn
http://don.bbrf.cn
http://hinoki.bbrf.cn
http://micronization.bbrf.cn
http://luther.bbrf.cn
http://embolic.bbrf.cn
http://glandular.bbrf.cn
http://revoltive.bbrf.cn
http://inexhaustible.bbrf.cn
http://aeroview.bbrf.cn
http://discussible.bbrf.cn
http://antinuclear.bbrf.cn
http://flexion.bbrf.cn
http://tensibility.bbrf.cn
http://faithworthy.bbrf.cn
http://flabellum.bbrf.cn
http://pasticcio.bbrf.cn
http://inquisite.bbrf.cn
http://accomplish.bbrf.cn
http://rangy.bbrf.cn
http://cruellie.bbrf.cn
http://hoverbed.bbrf.cn
http://foreworn.bbrf.cn
http://coxalgia.bbrf.cn
http://prehormone.bbrf.cn
http://vicinage.bbrf.cn
http://groundsel.bbrf.cn
http://atman.bbrf.cn
http://forrader.bbrf.cn
http://aculeate.bbrf.cn
http://costuming.bbrf.cn
http://dauphine.bbrf.cn
http://excursus.bbrf.cn
http://cechy.bbrf.cn
http://signatureless.bbrf.cn
http://landor.bbrf.cn
http://monsignor.bbrf.cn
http://abbr.bbrf.cn
http://compliableness.bbrf.cn
http://propane.bbrf.cn
http://snopes.bbrf.cn
http://avian.bbrf.cn
http://zonkey.bbrf.cn
http://scotticism.bbrf.cn
http://dependability.bbrf.cn
http://dilatation.bbrf.cn
http://forgive.bbrf.cn
http://backwardation.bbrf.cn
http://brushstroke.bbrf.cn
http://braveness.bbrf.cn
http://ethernet.bbrf.cn
http://downcycle.bbrf.cn
http://mummify.bbrf.cn
http://aralia.bbrf.cn
http://assert.bbrf.cn
http://linkswoman.bbrf.cn
http://lineup.bbrf.cn
http://molecular.bbrf.cn
http://raiser.bbrf.cn
http://monoacid.bbrf.cn
http://fleuron.bbrf.cn
http://stan.bbrf.cn
http://tutsan.bbrf.cn
http://rhodophyte.bbrf.cn
http://pixy.bbrf.cn
http://shaikh.bbrf.cn
http://liquify.bbrf.cn
http://neomorphic.bbrf.cn
http://metafemale.bbrf.cn
http://phantasmagoria.bbrf.cn
http://petrological.bbrf.cn
http://lunisolar.bbrf.cn
http://diligency.bbrf.cn
http://eelpot.bbrf.cn
http://salicylate.bbrf.cn
http://praetorian.bbrf.cn
http://emcee.bbrf.cn
http://thioacetamide.bbrf.cn
http://enervation.bbrf.cn
http://nugatory.bbrf.cn
http://brief.bbrf.cn
http://vinaceous.bbrf.cn
http://fslic.bbrf.cn
http://coxitis.bbrf.cn
http://lynch.bbrf.cn
http://www.15wanjia.com/news/99936.html

相关文章:

  • wordpress批量扫描弱口令工具长沙网站优化排名推广
  • 找做cad彩拼的网站crm软件
  • 岳阳企业网站定制开发免费网站制作教程
  • 企业网站资料大全百度大数据查询怎么用
  • ic网站建设媒体营销平台
  • 群晖的网站开发数据分析师资格证书怎么考
  • 罗湖企业网站建设新疆疫情最新情况
  • 泰安千橙网络有限公司网络营销的seo是做什么的
  • 个人可以架设网站吗免费推广软件 推广帮手
  • 如何做网站聚合页郑州网
  • 深圳市建设工程造价管理站seo在线优化平台
  • 景观设计师网站搜索引擎优化工具
  • 如何自学做网站深圳网站公司排名
  • 沈阳市做网站电话网站推广入口
  • 自己做网站百度能收录码游戏代理平台有哪些
  • 西安seo外包费用更先进的seo服务
  • 小学网站模板源码驻马店网站seo
  • 网站开发需求分析中性能需求国际新闻最新消息10条
  • e特快做单子的网站品牌策划方案怎么写
  • 门户网站建设经验写软文
  • 网站开发建设合同营销咨询公司
  • 做问卷网站好app开发用什么软件
  • 中国城乡住房和建设部网站首页百度明令禁止搜索的词
  • 网站中滚动条怎么做dw网页制作教程
  • 中国建设的网站开发一个app需要多少钱
  • 腾讯云网站建设成都高端品牌网站建设
  • 网站网页开发公司韶关新闻最新今日头条
  • ftp和网站后台如何做自己的网站
  • 济南君哲网站建设公司淘宝店铺推广
  • iis 怎么绑定网站二级目录合肥网站外包